@wix/himalaya-cli 0.1929.0 → 0.1930.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.
Files changed (183) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +2 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +7 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts +12 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat-web.mjs +19 -9
  5. package/dist/browser-plane/assets.json +5 -5
  6. package/dist/browser-plane/preview-deferred/{95a3ae045bad903e458ea7a5800e60e1044f0f754a65d7127de66ba62e897068.bin → 7656e5effbeaee2ab20810b9903e7e785d9dffb0a0563f25c2746011cf4e23e9.bin} +1 -1
  7. package/dist/browser-plane/sw.js +10 -10
  8. package/dist/cli.mjs +254 -70
  9. package/dist/preview-assets.generated.bin +0 -0
  10. package/guides/component-index.md +1 -1
  11. package/guides/component-reference.json +1 -1
  12. package/guides/component-reference.md +7 -0
  13. package/guides/sdk-reference.json +2 -2
  14. package/package.json +2 -2
  15. package/templates/bare-fashion/tier5-src/_shared/owner-load-error.ts +1 -1
  16. package/templates/beauty-salon/tier5-src/_shared/owner-load-error.ts +1 -1
  17. package/templates/beauty-salon-owner/dev/index.ts +169 -139
  18. package/templates/beauty-salon-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  19. package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  20. package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  21. package/templates/beauty-salon-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  22. package/templates/beauty-salon-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  23. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  24. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  25. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  26. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  27. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  28. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  29. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  30. package/templates/beauty-salon-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  31. package/templates/branded-lite/tier5-src/_shared/owner-load-error.ts +1 -1
  32. package/templates/brandy/tier5-src/_shared/owner-load-error.ts +1 -1
  33. package/templates/community-club/tier5-src/_shared/owner-load-error.ts +1 -1
  34. package/templates/community-club-owner/dev/index.ts +167 -132
  35. package/templates/community-club-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  36. package/templates/community-club-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  37. package/templates/community-club-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  38. package/templates/community-club-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  39. package/templates/community-club-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  40. package/templates/community-club-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  41. package/templates/community-club-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  42. package/templates/community-club-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  43. package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  44. package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  45. package/templates/community-club-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  46. package/templates/community-club-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  47. package/templates/conference/tier5-src/_shared/owner-load-error.ts +1 -1
  48. package/templates/events-meetups/tier5-src/_shared/owner-load-error.ts +1 -1
  49. package/templates/events-meetups-owner/dev/index.ts +165 -125
  50. package/templates/events-meetups-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  51. package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  52. package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  53. package/templates/events-meetups-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  54. package/templates/events-meetups-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  55. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  56. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  57. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  58. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  59. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  60. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  61. package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +1 -1
  62. package/templates/gym-fitness/tier5-src/_shared/owner-load-error.ts +1 -1
  63. package/templates/gym-fitness-owner/dev/index.ts +169 -139
  64. package/templates/gym-fitness-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  65. package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  66. package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  67. package/templates/gym-fitness-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  68. package/templates/gym-fitness-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  69. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  70. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  71. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  72. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  73. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  74. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  75. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  76. package/templates/gym-fitness-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  77. package/templates/himi-chat/tier5-src/_shared/owner-load-error.ts +1 -1
  78. package/templates/medical-services/tier5-src/_shared/owner-load-error.ts +1 -1
  79. package/templates/nonprofit-cause/tier5-src/_shared/owner-load-error.ts +1 -1
  80. package/templates/nonprofit-cause-owner/dev/index.ts +167 -132
  81. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  82. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  83. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  84. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  85. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  86. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  87. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  88. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  89. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  90. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  91. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  92. package/templates/nonprofit-cause-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  93. package/templates/owner-lite/dev/index.ts +171 -141
  94. package/templates/owner-lite/himalaya.content.json +1 -1
  95. package/templates/owner-lite/tier5-src/_shared/owner-load-error.ts +1 -1
  96. package/templates/owner-lite/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  97. package/templates/owner-lite/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  98. package/templates/owner-lite/tier5-src/_shared/owner-selected-site.ts +15 -0
  99. package/templates/owner-lite/tier5-src/_shared/owner-widget-reads.ts +7 -0
  100. package/templates/owner-lite/tier5-src/himi-owner-lite-home/index.ts +30 -8
  101. package/templates/owner-lite/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  102. package/templates/owner-lite/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  103. package/templates/owner-lite/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  104. package/templates/owner-lite/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  105. package/templates/owner-lite/tier5-src/himi-owner-lite-order/index.ts +4 -1
  106. package/templates/owner-lite/tier5-src/himi-owner-lite-record/index.ts +7 -1
  107. package/templates/owner-lite/tier5-src/wix-owner-booking/index.ts +4 -1
  108. package/templates/personal-fitness-trainer/tier5-src/_shared/owner-load-error.ts +1 -1
  109. package/templates/podcast-creator/tier5-src/_shared/owner-load-error.ts +1 -1
  110. package/templates/podcast-creator-owner/dev/index.ts +167 -132
  111. package/templates/podcast-creator-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  112. package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  113. package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  114. package/templates/podcast-creator-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  115. package/templates/podcast-creator-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  116. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  117. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  118. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  119. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  120. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  121. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  122. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  123. package/templates/portfolio-creative/tier5-src/_shared/owner-load-error.ts +1 -1
  124. package/templates/portfolio-creative-owner/dev/index.ts +169 -139
  125. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  126. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  127. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  128. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  129. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  130. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  131. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  132. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  133. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  134. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  135. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  136. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  137. package/templates/portfolio-creative-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  138. package/templates/professional-services/tier5-src/_shared/owner-load-error.ts +1 -1
  139. package/templates/restaurant/tier5-src/_shared/owner-load-error.ts +1 -1
  140. package/templates/restaurant-owner/dev/index.ts +169 -139
  141. package/templates/restaurant-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  142. package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  143. package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  144. package/templates/restaurant-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  145. package/templates/restaurant-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  146. package/templates/restaurant-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  147. package/templates/restaurant-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  148. package/templates/restaurant-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  149. package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  150. package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  151. package/templates/restaurant-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  152. package/templates/restaurant-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  153. package/templates/restaurant-owner/tier5-src/wix-owner-booking/index.ts +4 -1
  154. package/templates/retail-store/tier5-src/_shared/owner-load-error.ts +1 -1
  155. package/templates/retail-store-owner/dev/index.ts +167 -132
  156. package/templates/retail-store-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  157. package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  158. package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  159. package/templates/retail-store-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  160. package/templates/retail-store-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  161. package/templates/retail-store-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  162. package/templates/retail-store-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  163. package/templates/retail-store-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  164. package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  165. package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  166. package/templates/retail-store-owner/tier5-src/himi-owner-lite-order/index.ts +4 -1
  167. package/templates/retail-store-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  168. package/templates/salon-spa/tier5-src/_shared/owner-load-error.ts +1 -1
  169. package/templates/wholesale-store/tier5-src/_shared/owner-load-error.ts +1 -1
  170. package/templates/yoga-studio/tier5-src/_shared/owner-load-error.ts +1 -1
  171. package/templates/yoga-studio-owner/dev/index.ts +167 -132
  172. package/templates/yoga-studio-owner/tier5-src/_shared/owner-load-error.ts +1 -1
  173. package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-availability.ts +12 -2
  174. package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-tab.ts +81 -5
  175. package/templates/yoga-studio-owner/tier5-src/_shared/owner-selected-site.ts +15 -0
  176. package/templates/yoga-studio-owner/tier5-src/_shared/owner-widget-reads.ts +7 -0
  177. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-home/index.ts +30 -8
  178. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-inbox/index.ts +47 -8
  179. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-inbox-thread/index.ts +12 -5
  180. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro/index.ts +132 -39
  181. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +10 -8
  182. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-record/index.ts +7 -1
  183. package/templates/yoga-studio-owner/tier5-src/wix-owner-booking/index.ts +4 -1
@@ -9,7 +9,7 @@
9
9
  import { defineService } from "@himalaya/state";
10
10
  import { getOrder, type WixOrder, type WixOrderLineItem } from "@himalaya/wix-ecom";
11
11
  import { ownerLoadError, isOwnerPreviewDemo, ownerDemoFallback } from "../_shared/owner-load-error.js";
12
- import { askMaestroHidden } from "../_shared/owner-maestro-tab.js";
12
+ import { askMaestroHidden, askMaestroNav } from "../_shared/owner-maestro-tab.js";
13
13
  import { DEMO_ORDERS, DEMO_NOTE, demoOrderDate } from "../_shared/owner-preview-demo.js";
14
14
  import { stashCopy, copyParam } from "../_shared/himi-copy.js";
15
15
  import { formatDateMedium } from "../_shared/engine-intl.js";
@@ -287,9 +287,12 @@ const svc = defineService<OrderState, {
287
287
  follow: (s: OrderState) => OrderState | undefined;
288
288
  onFollowStarted: (s: OrderState, activityId?: string) => OrderState;
289
289
  unfollow: (s: OrderState) => OrderState;
290
+ askMaestro: (s: OrderState) => OrderState;
290
291
  }>("himiOwnerLiteOrder", {
291
292
  state: shape({ status: "loading" }),
292
293
  actions: {
294
+ // "Ask Maestro": the chat opens on the Maestro tab, about this order.
295
+ askMaestro: (s) => askMaestroNav(s, { kind: "order", id: s.id, subject: s.title }),
293
296
  load: async (s, arg) => {
294
297
  stashCopy(arg); // absorb the descriptor's onAppear copy-pack param
295
298
  const id = idFrom(arg, s.id) || inputId();
@@ -2,7 +2,7 @@ import { defineService } from '@himalaya/state';
2
2
  import { getOwnerRecord, ownerModuleError, type OwnerRecord } from '../_shared/owner-module-data.js';
3
3
  import { ownerInput, inputOwnerModule, openOwnerDashboard } from '../_shared/owner-module-runtime.js';
4
4
  import { stashCopy, copyParam } from '../_shared/himi-copy.js';
5
- import { askMaestroHidden } from '../_shared/owner-maestro-tab.js';
5
+ import { askMaestroHidden, askMaestroNav } from '../_shared/owner-maestro-tab.js';
6
6
  const moduleId = inputOwnerModule();
7
7
  interface State {
8
8
  /** The record on screen, so the screen can name it to another screen. */
@@ -18,6 +18,12 @@ const svc = defineService('himiOwnerRecord', {
18
18
  state: { id: '', askMaestroHidden: 'true', status: 'loading', title: '', subtitle: '', image: '', noImage: true, statusLabel: '', fields: [], error: '',
19
19
  notLoading: false, notErrored: true, hideContent: true, handoffError: '' } as State,
20
20
  actions: {
21
+ // "Ask Maestro": the chat opens on the Maestro tab, about this record.
22
+ // The screen says what kind of record this is (only a contact's detail has the button). No
23
+ // subject: a contact's title is a person's name, which the Maestro worker reads itself.
24
+ askMaestro(state: State, arg?: unknown): State {
25
+ return askMaestroNav(state, { kind: (arg as { kind?: unknown } | undefined)?.kind, id: state.id });
26
+ },
21
27
  async load(state: State, arg?: unknown): Promise<State | undefined> {
22
28
  stashCopy(arg);
23
29
  const revision = ++generation;
@@ -146,7 +146,7 @@ const CODED = /HTTP (\d{3}) \[([A-Z0-9_]+)\]/;
146
146
  * `HTTP 428 [MISSING_METASITE_ID]: Couldn't extract metasiteId from the request
147
147
  * context` where "6 orders" belongs.
148
148
  */
149
- const SITE_CONTEXT_CODES = ["MISSING_METASITE_ID", "MISSING_REQUEST_SITE_CONTEXT", "MISSING_SITE_CONTEXT"];
149
+ export const SITE_CONTEXT_CODES = ["MISSING_METASITE_ID", "MISSING_REQUEST_SITE_CONTEXT", "MISSING_SITE_CONTEXT"];
150
150
  /** Longest raw upstream text worth showing. Beyond this it stops being a
151
151
  * message and starts being a payload dump. */
152
152
  const MAX_RAW = 200;
@@ -13104,13 +13104,9 @@ const SCREENS = runtimeSetting({
13104
13104
  "fullWidth": true,
13105
13105
  "leadingIcon": "ai",
13106
13106
  "action": {
13107
- "actionId": "himi.open",
13107
+ "actionId": "tier5.himiOwnerRecord.askMaestro",
13108
13108
  "params": {
13109
- "screenId": "himi_owner_lite_maestro",
13110
- "kind": "contact",
13111
- "id": "$service:himiOwnerRecord.id",
13112
- "title": "Maestro",
13113
- "subtitle": "Your business assistant, by Symphony."
13109
+ "kind": "contact"
13114
13110
  }
13115
13111
  }
13116
13112
  }
@@ -57215,6 +57211,9 @@ const SCREENS = runtimeSetting({
57215
57211
  ],
57216
57212
  "minBinaryVersion": "0.1.0",
57217
57213
  "bundleVersion": "0.0.1"
57214
+ },
57215
+ "topBar": {
57216
+ "actions": []
57218
57217
  }
57219
57218
  },
57220
57219
  "himi_owner_lite_brief": {
@@ -64090,6 +64089,22 @@ const SCREENS = runtimeSetting({
64090
64089
  "collapseWhenEmpty": true
64091
64090
  }
64092
64091
  }
64092
+ },
64093
+ {
64094
+ "id": "himi_owner_lite_maestro.context",
64095
+ "body": {
64096
+ "package": "himalaya",
64097
+ "type": "Text",
64098
+ "props": {
64099
+ "text": "$service:himiOwnerLiteMaestro.contextLabel",
64100
+ "style": "footnote",
64101
+ "color": "textSecondary",
64102
+ "maxLines": 1
64103
+ }
64104
+ },
64105
+ "modifiers": {
64106
+ "hiddenPath": "$service:himiOwnerLiteMaestro.contextHidden"
64107
+ }
64093
64108
  }
64094
64109
  ]
64095
64110
  }
@@ -64353,16 +64368,32 @@ const SCREENS = runtimeSetting({
64353
64368
  "package": "himalaya",
64354
64369
  "type": "Text",
64355
64370
  "props": {
64356
- "text": "Working on it…",
64371
+ "text": "$item.content",
64357
64372
  "style": "footnote",
64358
64373
  "color": "textSecondary",
64359
- "maxLines": 1
64374
+ "maxLines": 2
64360
64375
  }
64361
64376
  },
64362
64377
  "modifiers": {
64363
64378
  "hiddenPath": "$item.thinkingHidden"
64364
64379
  }
64365
64380
  },
64381
+ {
64382
+ "id": "",
64383
+ "body": {
64384
+ "package": "himalaya",
64385
+ "type": "Text",
64386
+ "props": {
64387
+ "text": "$item.content",
64388
+ "style": "footnote",
64389
+ "color": "textSecondary",
64390
+ "maxLines": 3
64391
+ }
64392
+ },
64393
+ "modifiers": {
64394
+ "hiddenPath": "$item.noteHidden"
64395
+ }
64396
+ },
64366
64397
  {
64367
64398
  "id": "himi_owner_lite_maestro.card_$item.id",
64368
64399
  "body": {
@@ -64553,6 +64584,7 @@ const SCREENS = runtimeSetting({
64553
64584
  "top": 18,
64554
64585
  "bottom": 24
64555
64586
  },
64587
+ "keyboardDismiss": "tap",
64556
64588
  "onAppear": {
64557
64589
  "actionId": "tier5.himiOwnerLiteMaestro.load"
64558
64590
  }
@@ -64571,88 +64603,34 @@ const SCREENS = runtimeSetting({
64571
64603
  "minBinaryVersion": "0.1.0",
64572
64604
  "bundleVersion": "0.0.1"
64573
64605
  },
64574
- "stickyHeader": {
64575
- "id": "himi_owner_lite_maestro.controls",
64576
- "body": {
64577
- "package": "himalaya",
64578
- "type": "HStack",
64579
- "props": {
64580
- "spacing": 8,
64581
- "children": [
64582
- {
64583
- "id": "himi_owner_lite_maestro.context",
64584
- "body": {
64585
- "package": "himalaya",
64586
- "type": "Text",
64587
- "props": {
64588
- "text": "$service:himiOwnerLiteMaestro.contextLabel",
64589
- "style": "footnote",
64590
- "color": "textSecondary",
64591
- "maxLines": 1,
64592
- "collapseWhenEmpty": true
64593
- }
64594
- }
64595
- },
64596
- {
64597
- "id": "",
64598
- "body": {
64599
- "package": "himalaya",
64600
- "type": "Spacer",
64601
- "props": {}
64602
- }
64603
- },
64604
- {
64605
- "id": "himi_owner_lite_maestro.history",
64606
- "body": {
64607
- "package": "himalaya",
64608
- "type": "Button",
64609
- "props": {
64610
- "title": "History",
64611
- "style": "link",
64612
- "size": "sm",
64613
- "fullWidth": false,
64614
- "action": {
64615
- "actionId": "himi.open",
64616
- "params": {
64617
- "screenId": "himi_owner_lite_maestro_history",
64618
- "title": "Conversations",
64619
- "subtitle": "Pick up where you left off."
64620
- }
64621
- }
64622
- }
64623
- }
64624
- },
64625
- {
64626
- "id": "himi_owner_lite_maestro.newChat",
64627
- "body": {
64628
- "package": "himalaya",
64629
- "type": "Button",
64630
- "props": {
64631
- "title": "New chat",
64632
- "style": "link",
64633
- "size": "sm",
64634
- "fullWidth": false,
64635
- "action": {
64636
- "actionId": "tier5.himiOwnerLiteMaestro.newChat"
64637
- }
64638
- }
64639
- }
64606
+ "topBar": {
64607
+ "actions": [
64608
+ {
64609
+ "id": "himi_owner_lite_maestro.history",
64610
+ "icon": "clock",
64611
+ "accessibilityLabel": "History",
64612
+ "onTap": {
64613
+ "actionId": "himi.open",
64614
+ "params": {
64615
+ "screenId": "himi_owner_lite_maestro_history",
64616
+ "title": "Conversations",
64617
+ "subtitle": "Pick up where you left off."
64640
64618
  }
64641
- ]
64642
- }
64643
- },
64644
- "modifiers": {
64645
- "background": {
64646
- "token": "surfacePrimary"
64647
- },
64648
- "padding": {
64649
- "leading": 16,
64650
- "trailing": 16,
64651
- "top": 4,
64652
- "bottom": 4
64619
+ },
64620
+ "hiddenPath": "$service:himiOwnerLiteMaestro.chatHidden",
64621
+ "hiddenPathScope": "screen"
64653
64622
  },
64654
- "hiddenPath": "$service:himiOwnerLiteMaestro.chatHidden"
64655
- }
64623
+ {
64624
+ "id": "himi_owner_lite_maestro.newChat",
64625
+ "icon": "edit",
64626
+ "accessibilityLabel": "New chat",
64627
+ "onTap": {
64628
+ "actionId": "tier5.himiOwnerLiteMaestro.newChat"
64629
+ },
64630
+ "hiddenPath": "$service:himiOwnerLiteMaestro.chatHidden",
64631
+ "hiddenPathScope": "screen"
64632
+ }
64633
+ ]
64656
64634
  },
64657
64635
  "stickyFooter": {
64658
64636
  "id": "himi_owner_lite_maestro.composer",
@@ -64750,50 +64728,111 @@ const SCREENS = runtimeSetting({
64750
64728
  }
64751
64729
  },
64752
64730
  {
64753
- "id": "form_maestro",
64731
+ "id": "",
64754
64732
  "body": {
64755
64733
  "package": "himalaya",
64756
- "type": "Form",
64734
+ "type": "HStack",
64757
64735
  "props": {
64758
- "id": "maestro",
64759
- "fields": [
64736
+ "spacing": 8,
64737
+ "alignment": "trailing",
64738
+ "children": [
64760
64739
  {
64761
- "id": "field_message",
64740
+ "id": "himi_owner_lite_maestro.input",
64762
64741
  "body": {
64763
64742
  "package": "himalaya",
64764
- "type": "FormField",
64743
+ "type": "TextField",
64765
64744
  "props": {
64766
- "id": "message",
64767
- "label": "",
64768
- "kind": "text",
64769
- "text": {
64770
- "value": "$service:himiOwnerLiteMaestro.input",
64771
- "placeholder": "Ask Maestro…",
64772
- "keyboard": "default",
64773
- "autoCapitalization": "sentences",
64774
- "multilineMaxLines": 4,
64775
- "onChange": {
64776
- "actionId": "tier5.himiOwnerLiteMaestro.setInput"
64777
- }
64778
- }
64745
+ "valuePath": "$service:himiOwnerLiteMaestro.input",
64746
+ "placeholder": "Ask Maestro…",
64747
+ "keyboard": "default",
64748
+ "autoCapitalization": "sentences",
64749
+ "multilineMaxLines": 4,
64750
+ "maxLength": 4000,
64751
+ "onChange": {
64752
+ "actionId": "tier5.himiOwnerLiteMaestro.setInput"
64753
+ },
64754
+ "borderless": true
64755
+ }
64756
+ },
64757
+ "modifiers": {
64758
+ "weight": 1,
64759
+ "accessibilityLabel": "Ask Maestro…",
64760
+ "background": {
64761
+ "token": "surfaceSecondary"
64762
+ },
64763
+ "cornerRadius": 22,
64764
+ "padding": {
64765
+ "leading": 16,
64766
+ "trailing": 12,
64767
+ "top": 11,
64768
+ "bottom": 11
64779
64769
  }
64780
64770
  }
64781
- }
64782
- ],
64783
- "submitButton": {
64784
- "id": "himi_owner_lite_maestro.send",
64785
- "body": {
64786
- "package": "himalaya",
64787
- "type": "Button",
64788
- "props": {
64789
- "title": "Send",
64790
- "style": "primary",
64791
- "action": {
64792
- "actionId": "tier5.himiOwnerLiteMaestro.submit"
64771
+ },
64772
+ {
64773
+ "id": "",
64774
+ "body": {
64775
+ "package": "himalaya",
64776
+ "type": "ZStack",
64777
+ "props": {
64778
+ "alignment": "center",
64779
+ "children": [
64780
+ {
64781
+ "id": "himi_owner_lite_maestro.send_off",
64782
+ "body": {
64783
+ "package": "himalaya",
64784
+ "type": "Icon",
64785
+ "props": {
64786
+ "name": "send",
64787
+ "size": 20,
64788
+ "tint": "textTertiary"
64789
+ }
64790
+ },
64791
+ "modifiers": {
64792
+ "accessibilityRole": "decorative",
64793
+ "width": 44,
64794
+ "height": 44,
64795
+ "cornerRadius": 22,
64796
+ "background": {
64797
+ "token": "surfaceSecondary"
64798
+ }
64799
+ }
64800
+ },
64801
+ {
64802
+ "id": "himi_owner_lite_maestro.send",
64803
+ "body": {
64804
+ "package": "himalaya",
64805
+ "type": "Icon",
64806
+ "props": {
64807
+ "name": "send",
64808
+ "size": 20,
64809
+ "tint": "textOnAccent"
64810
+ }
64811
+ },
64812
+ "modifiers": {
64813
+ "accessibilityRole": "button",
64814
+ "width": 44,
64815
+ "height": 44,
64816
+ "cornerRadius": 22,
64817
+ "background": {
64818
+ "token": "accentPrimary"
64819
+ },
64820
+ "accessibilityLabel": "Send",
64821
+ "onTap": {
64822
+ "actionId": "tier5.himiOwnerLiteMaestro.submit"
64823
+ },
64824
+ "hiddenPath": "$service:himiOwnerLiteMaestro.noInput"
64825
+ }
64826
+ }
64827
+ ]
64793
64828
  }
64829
+ },
64830
+ "modifiers": {
64831
+ "width": 44,
64832
+ "height": 44
64794
64833
  }
64795
64834
  }
64796
- }
64835
+ ]
64797
64836
  }
64798
64837
  }
64799
64838
  }
@@ -64820,8 +64859,7 @@ const SCREENS = runtimeSetting({
64820
64859
  },
64821
64860
  "hostTitle": {
64822
64861
  "title": "Maestro",
64823
- "subtitle": "Your business assistant, by Symphony.",
64824
- "replaces": "himi_owner_lite_maestro.header"
64862
+ "replaces": "himi_owner_lite_maestro.header.title"
64825
64863
  }
64826
64864
  },
64827
64865
  "himi_owner_lite_maestro_history": {
@@ -64958,7 +64996,7 @@ const SCREENS = runtimeSetting({
64958
64996
  "package": "himalaya",
64959
64997
  "type": "Icon",
64960
64998
  "props": {
64961
- "name": "edit",
64999
+ "name": "chat",
64962
65000
  "size": 20,
64963
65001
  "tint": "accentPrimary"
64964
65002
  }
@@ -65044,8 +65082,7 @@ const SCREENS = runtimeSetting({
65044
65082
  "screenId": "himi_owner_lite_maestro",
65045
65083
  "conversationId": "$item.id",
65046
65084
  "n": "$item.stamp",
65047
- "title": "Maestro",
65048
- "subtitle": "Your business assistant, by Symphony."
65085
+ "title": "Maestro"
65049
65086
  }
65050
65087
  }
65051
65088
  }
@@ -65133,6 +65170,9 @@ const SCREENS = runtimeSetting({
65133
65170
  "minBinaryVersion": "0.1.0",
65134
65171
  "bundleVersion": "0.0.1"
65135
65172
  },
65173
+ "topBar": {
65174
+ "actions": []
65175
+ },
65136
65176
  "hostTitle": {
65137
65177
  "title": "Conversations",
65138
65178
  "subtitle": "Pick up where you left off.",
@@ -83623,14 +83663,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
83623
83663
  "fullWidth": true,
83624
83664
  "leadingIcon": "ai",
83625
83665
  "action": {
83626
- "actionId": "himi.open",
83666
+ "actionId": "tier5.himiOwnerLiteOrder.askMaestro",
83627
83667
  "params": {
83628
- "screenId": "himi_owner_lite_maestro",
83629
- "kind": "order",
83630
- "id": "$service:himiOwnerLiteOrder.id",
83631
- "subject": "$service:himiOwnerLiteOrder.title",
83632
- "title": "Maestro",
83633
- "subtitle": "Your business assistant, by Symphony."
83668
+ "kind": "order"
83634
83669
  }
83635
83670
  }
83636
83671
  }
@@ -87577,14 +87612,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
87577
87612
  "fullWidth": true,
87578
87613
  "leadingIcon": "ai",
87579
87614
  "action": {
87580
- "actionId": "himi.open",
87615
+ "actionId": "tier5.ownerBooking.askMaestro",
87581
87616
  "params": {
87582
- "screenId": "himi_owner_lite_maestro",
87583
- "kind": "booking",
87584
- "id": "$service:ownerBooking.id",
87585
- "subject": "$service:ownerBooking.title",
87586
- "title": "Maestro",
87587
- "subtitle": "Your business assistant, by Symphony."
87617
+ "kind": "booking"
87588
87618
  }
87589
87619
  }
87590
87620
  }
@@ -146,7 +146,7 @@ const CODED = /HTTP (\d{3}) \[([A-Z0-9_]+)\]/;
146
146
  * `HTTP 428 [MISSING_METASITE_ID]: Couldn't extract metasiteId from the request
147
147
  * context` where "6 orders" belongs.
148
148
  */
149
- const SITE_CONTEXT_CODES = ["MISSING_METASITE_ID", "MISSING_REQUEST_SITE_CONTEXT", "MISSING_SITE_CONTEXT"];
149
+ export const SITE_CONTEXT_CODES = ["MISSING_METASITE_ID", "MISSING_REQUEST_SITE_CONTEXT", "MISSING_SITE_CONTEXT"];
150
150
  /** Longest raw upstream text worth showing. Beyond this it stops being a
151
151
  * message and starts being a payload dump. */
152
152
  const MAX_RAW = 200;
@@ -28,9 +28,19 @@ export async function symphonyAccount(api: MaestroWixApi): Promise<string> {
28
28
  return typeof id === "string" ? id.trim() : "";
29
29
  }
30
30
 
31
+ /** The account's Spaces. Throws when they could not be asked.
32
+ *
33
+ * Not asked a second time here after a refusal. The first call a run makes for the Symphony
34
+ * account can answer 403 (measured live 2026-11-28), but a worker has no timer to wait with, and
35
+ * the host remembers a credential it could not get for ten seconds, so an immediate second ask
36
+ * is refused the same way. The caller asks again on its own schedule. */
37
+ async function readSpaces(api: MaestroWixApi, account: string): Promise<Spaces | null> {
38
+ return (await api.call("POST", SPACES, {}, forSymphonyAccount(account))) as Spaces | null;
39
+ }
40
+
31
41
  /** Whether `site` is the website of one of the owner's Spaces. Throws when it could not be asked. */
32
42
  export async function isSpaceWebsite(api: MaestroWixApi, account: string, site: string): Promise<boolean> {
33
- const res = (await api.call("POST", SPACES, {}, forSymphonyAccount(account))) as Spaces | null;
43
+ const res = await readSpaces(api, account);
34
44
  return (res?.workspaces ?? []).some((w) => w?.website?.metaSiteId === site);
35
45
  }
36
46
 
@@ -45,7 +55,7 @@ export interface SpaceWebsite { id: string; name: string; space: string }
45
55
  export async function spaceWebsites(api: MaestroWixApi): Promise<SpaceWebsite[]> {
46
56
  const account = await symphonyAccount(api);
47
57
  if (!account) return [];
48
- const res = (await api.call("POST", SPACES, {}, forSymphonyAccount(account))) as Spaces | null;
58
+ const res = await readSpaces(api, account);
49
59
  const out: SpaceWebsite[] = [];
50
60
  for (const w of res?.workspaces ?? []) {
51
61
  const id = typeof w?.website?.metaSiteId === "string" ? w.website.metaSiteId.trim() : "";
@@ -12,10 +12,11 @@
12
12
  // when the record changes while it stays on screen, so the button can lag one visit behind the tab.
13
13
  // Shown too long, it opens the Maestro screen, which says so itself when Maestro is unavailable.
14
14
 
15
- import { readSelectedSite } from "./owner-selected-site.js";
15
+ import { navigate, type NavDirective } from "@himalaya/state";
16
+ import { currentBusinessId } from "./owner-selected-site.js";
16
17
 
17
18
  type StorageLike = { getItem(key: string): string | null; setItem(key: string, value: string): void };
18
- type Host = { storage?: StorageLike; input?: Record<string, unknown> };
19
+ type Host = { storage?: StorageLike };
19
20
  const host = (): Host | undefined => (globalThis as { himalaya?: Host }).himalaya;
20
21
 
21
22
  const KEY = "himi.ownerLite.maestroTab.v1";
@@ -36,7 +37,82 @@ export function maestroTabIsFor(site: string): boolean {
36
37
  * Maestro for the business on screen. The business is the one the host scoped, else the one
37
38
  * picked on Sites, as the Maestro screen reads it. */
38
39
  export function askMaestroHidden(): "true" | "false" {
39
- const scoped = host()?.input?.__himiPreferenceBusiness;
40
- const site = (typeof scoped === "string" ? scoped.trim() : "") || readSelectedSite()?.id || "";
41
- return maestroTabIsFor(site) ? "false" : "true";
40
+ return maestroTabIsFor(currentBusinessId()) ? "false" : "true";
41
+ }
42
+ // ── "Ask Maestro" from a detail screen ─────────────────────────────────────────────────────
43
+ // The detail screen's worker leaves the item here and switches to the Maestro tab; the Maestro
44
+ // screen's worker reads it when the tab appears. A screen param cannot carry it: a tab switch
45
+ // takes none. The request names the business it was left for, and is good for half a minute:
46
+ // the Maestro worker acts on each stamp once, for that business only, and a request the tab
47
+ // never picked up (the switch was dropped, or a turn was streaming there) is then ignored.
48
+ // It is dropped as soon as its chat is used (a first turn) or left (New chat), and when the
49
+ // owner changes. Not on the read itself: the Maestro screen loads twice as it opens, and both
50
+ // loads must find it.
51
+
52
+ const ASK_KEY = "himi.ownerLite.maestroAsk.v1";
53
+ const ASK_REQUEST_TTL_MS = 30_000;
54
+
55
+ export type AskMaestroKind = "order" | "booking" | "contact";
56
+ export interface AskMaestroRequest { kind: AskMaestroKind; id: string; subject: string; site: string; n: number }
57
+
58
+ export const isAskMaestroKind = (v: unknown): v is AskMaestroKind => v === "order" || v === "booking" || v === "contact";
59
+
60
+ /** Leave "ask Maestro about this item" for the Maestro tab. False when it could not be left
61
+ * (no id, no business, or a host without storage): the caller then opens the Maestro screen
62
+ * with params. */
63
+ export function requestAskMaestro(kind: unknown, id: unknown, subject: unknown, now: number): boolean {
64
+ const item = typeof id === "string" ? id.trim() : "";
65
+ const site = currentBusinessId();
66
+ if (!isAskMaestroKind(kind) || !item || !site) return false;
67
+ const storage = host()?.storage;
68
+ if (!storage) return false;
69
+ try {
70
+ storage.setItem(ASK_KEY, JSON.stringify({ kind, id: item, subject: typeof subject === "string" ? subject.trim() : "", site, n: now }));
71
+ return true;
72
+ } catch { return false; }
73
+ }
74
+
75
+ /** The request a detail screen left for `site`, while it is recent. */
76
+ export function pendingAskRequest(now: number, site: string): AskMaestroRequest | null {
77
+ try {
78
+ const raw = host()?.storage?.getItem(ASK_KEY);
79
+ if (!raw) return null;
80
+ const v = JSON.parse(raw) as Partial<AskMaestroRequest> | null;
81
+ if (!v || !isAskMaestroKind(v.kind) || typeof v.id !== "string" || !v.id || typeof v.n !== "number") return null;
82
+ // An item of another business is never asked about here: the owner switched in between.
83
+ if (!site || v.site !== site) return null;
84
+ if (now < v.n || now - v.n > ASK_REQUEST_TTL_MS) return null;
85
+ return { kind: v.kind, id: v.id, subject: typeof v.subject === "string" ? v.subject : "", site, n: v.n };
86
+ } catch { return null; }
87
+ }
88
+
89
+ /** Drop the request: its chat was used or left (`stamp`: only the request with that stamp, so a
90
+ * newer one a detail screen left meanwhile stays), or the owner changed (no stamp: whatever is
91
+ * there). Never throws. */
92
+ export function clearAskRequest(stamp?: number): void {
93
+ try {
94
+ const storage = host()?.storage;
95
+ if (!storage) return;
96
+ if (stamp !== undefined) {
97
+ const raw = storage.getItem(ASK_KEY);
98
+ if (!raw || (JSON.parse(raw) as { n?: unknown } | null)?.n !== stamp) return;
99
+ }
100
+ storage.setItem(ASK_KEY, "");
101
+ } catch { /* no storage on this host, or nothing readable there: nothing to drop */ }
102
+ }
103
+
104
+ /** A detail worker's `askMaestro` action: leave the item, then switch to the Maestro tab at its
105
+ * root: a tab left on History or on a past chat would otherwise show that, and the root is
106
+ * what reads the request. Every binary that can show the Maestro tab knows `{ tab, reset }`:
107
+ * the form shipped on 2026-10-27, and the tab needs the NDJSON stream of 2026-11-25.
108
+ * On a host where the item cannot be left, open the Maestro screen about it instead. */
109
+ export function askMaestroNav<S extends object>(state: S, arg: unknown): S & { _nav: NavDirective } {
110
+ const a = (arg && typeof arg === "object" ? arg : {}) as { kind?: unknown; id?: unknown; subject?: unknown };
111
+ if (requestAskMaestro(a.kind, a.id, a.subject, Date.now())) return navigate(state, { tab: "maestro", reset: true });
112
+ const args: Record<string, string> = {};
113
+ for (const key of ["kind", "id", "subject"] as const) {
114
+ const value = a[key];
115
+ if (typeof value === "string" && value) args[key] = value;
116
+ }
117
+ return navigate(state, { screenId: "himi_owner_lite_maestro", args });
42
118
  }
@@ -107,3 +107,18 @@ export function fallbackNameFrom(arg: unknown, current = ""): string {
107
107
  const v = (arg as { businessName?: unknown } | undefined)?.businessName;
108
108
  return typeof v === "string" && v.trim() ? v.trim() : current;
109
109
  }
110
+
111
+ /**
112
+ * The business the owner is working in, as an id for a call that must name it ("" = none known).
113
+ *
114
+ * The picked one first: the Sites pick records it at the moment of the switch, for every worker.
115
+ * The host's own scope (`__himiPreferenceBusiness`) is the fallback, not the first choice: a tab
116
+ * kept alive across a switch keeps the scope it was opened with (measured live 2026-11-28: after
117
+ * a switch the Inbox tab went on reading the first business, while Home read the new one).
118
+ */
119
+ export function currentBusinessId(): string {
120
+ const picked = readSelectedSite()?.id?.trim();
121
+ if (picked) return picked;
122
+ const scoped = (globalThis as { himalaya?: { input?: Record<string, unknown> } }).himalaya?.input?.__himiPreferenceBusiness;
123
+ return typeof scoped === "string" ? scoped.trim() : "";
124
+ }
@@ -21,3 +21,10 @@ export function isSectionUnavailable(e: unknown): boolean {
21
21
  const text = String((e as Error)?.message ?? e);
22
22
  return /^HTTP (?:403|404|428)\b/.test(text) || /^HTTP \d{3} \[(?:FAILED_PRECONDITION|PERMISSION_DENIED)\]/.test(text);
23
23
  }
24
+
25
+ /** The business has not set this area up: its app is not installed on the site, which Wix
26
+ * answers with 428. Narrower than `isSectionUnavailable`: a 403 or a 404 may be a mistake
27
+ * worth showing, while this one is simply "nothing here". Read from the leading status only. */
28
+ export function isNotInstalled(e: unknown): boolean {
29
+ return /^HTTP 428\b/.test(String((e as Error)?.message ?? e));
30
+ }