@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;
@@ -13,7 +13,7 @@ import { formatWeekdayDateTime } from "../_shared/engine-intl.js";
13
13
  import { ownerLoadError, isBridgeUnavailable, isOwnerPreviewDemo } from "../_shared/owner-load-error.js";
14
14
  import { DEMO_APPOINTMENTS, DEMO_NOTE, demoAppointmentWindow } from "../_shared/owner-preview-demo.js";
15
15
  import { copyParam } from "../_shared/himi-copy.js";
16
- import { askMaestroHidden } from "../_shared/owner-maestro-tab.js";
16
+ import { askMaestroHidden, askMaestroNav } from "../_shared/owner-maestro-tab.js";
17
17
 
18
18
  interface ActionRow { id: string; label: string; action: string; url: string; screen: string; title: string; }
19
19
  interface KV { id: string; label: string; value: string; }
@@ -206,9 +206,12 @@ const svc = defineService<BookingState, {
206
206
  markPaid: (s: BookingState) => Promise<BookingState>;
207
207
  setAttended: (s: BookingState) => Promise<BookingState>;
208
208
  setNoShow: (s: BookingState) => Promise<BookingState>;
209
+ askMaestro: (s: BookingState) => BookingState;
209
210
  }>("ownerBooking", {
210
211
  state: { id: "", askMaestroHidden: "true", status: "loading", title: "", subtitle: "", initial: "?", when: "—", ends: "—", participants: "—", email: "—", phone: "—", staff: "—", location: "", locationHeader: "", videoLabel: "", videoUrl: "", intakeHeader: "", intake: "", actions: [], bookingStatus: "—", payment: "—", statusRaw: "", paymentRaw: "", orderId: "", isClass: false, attendedRaw: false, hideConfirm: true, hideMarkPaid: true, hideAttendance: true, hideDecline: true, hideCancel: true, revision: "", actionError: "", error: "", demoNote: "", notDemo: true },
211
212
  actions: {
213
+ // "Ask Maestro": the chat opens on the Maestro tab, about this booking.
214
+ askMaestro: (s) => askMaestroNav(s, { kind: "booking", id: s.id, subject: s.title }),
212
215
  load: async (s) => {
213
216
  try { return { ...(await fetchInto(s)), id: bookingId(), askMaestroHidden: askMaestroHidden() }; }
214
217
  catch (e) {
@@ -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;
@@ -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
  }
@@ -57291,6 +57287,9 @@ const SCREENS = runtimeSetting({
57291
57287
  ],
57292
57288
  "minBinaryVersion": "0.1.0",
57293
57289
  "bundleVersion": "0.0.1"
57290
+ },
57291
+ "topBar": {
57292
+ "actions": []
57294
57293
  }
57295
57294
  },
57296
57295
  "himi_owner_lite_brief": {
@@ -64166,6 +64165,22 @@ const SCREENS = runtimeSetting({
64166
64165
  "collapseWhenEmpty": true
64167
64166
  }
64168
64167
  }
64168
+ },
64169
+ {
64170
+ "id": "himi_owner_lite_maestro.context",
64171
+ "body": {
64172
+ "package": "himalaya",
64173
+ "type": "Text",
64174
+ "props": {
64175
+ "text": "$service:himiOwnerLiteMaestro.contextLabel",
64176
+ "style": "footnote",
64177
+ "color": "textSecondary",
64178
+ "maxLines": 1
64179
+ }
64180
+ },
64181
+ "modifiers": {
64182
+ "hiddenPath": "$service:himiOwnerLiteMaestro.contextHidden"
64183
+ }
64169
64184
  }
64170
64185
  ]
64171
64186
  }
@@ -64429,16 +64444,32 @@ const SCREENS = runtimeSetting({
64429
64444
  "package": "himalaya",
64430
64445
  "type": "Text",
64431
64446
  "props": {
64432
- "text": "Working on it…",
64447
+ "text": "$item.content",
64433
64448
  "style": "footnote",
64434
64449
  "color": "textSecondary",
64435
- "maxLines": 1
64450
+ "maxLines": 2
64436
64451
  }
64437
64452
  },
64438
64453
  "modifiers": {
64439
64454
  "hiddenPath": "$item.thinkingHidden"
64440
64455
  }
64441
64456
  },
64457
+ {
64458
+ "id": "",
64459
+ "body": {
64460
+ "package": "himalaya",
64461
+ "type": "Text",
64462
+ "props": {
64463
+ "text": "$item.content",
64464
+ "style": "footnote",
64465
+ "color": "textSecondary",
64466
+ "maxLines": 3
64467
+ }
64468
+ },
64469
+ "modifiers": {
64470
+ "hiddenPath": "$item.noteHidden"
64471
+ }
64472
+ },
64442
64473
  {
64443
64474
  "id": "himi_owner_lite_maestro.card_$item.id",
64444
64475
  "body": {
@@ -64629,6 +64660,7 @@ const SCREENS = runtimeSetting({
64629
64660
  "top": 18,
64630
64661
  "bottom": 24
64631
64662
  },
64663
+ "keyboardDismiss": "tap",
64632
64664
  "onAppear": {
64633
64665
  "actionId": "tier5.himiOwnerLiteMaestro.load"
64634
64666
  }
@@ -64647,88 +64679,34 @@ const SCREENS = runtimeSetting({
64647
64679
  "minBinaryVersion": "0.1.0",
64648
64680
  "bundleVersion": "0.0.1"
64649
64681
  },
64650
- "stickyHeader": {
64651
- "id": "himi_owner_lite_maestro.controls",
64652
- "body": {
64653
- "package": "himalaya",
64654
- "type": "HStack",
64655
- "props": {
64656
- "spacing": 8,
64657
- "children": [
64658
- {
64659
- "id": "himi_owner_lite_maestro.context",
64660
- "body": {
64661
- "package": "himalaya",
64662
- "type": "Text",
64663
- "props": {
64664
- "text": "$service:himiOwnerLiteMaestro.contextLabel",
64665
- "style": "footnote",
64666
- "color": "textSecondary",
64667
- "maxLines": 1,
64668
- "collapseWhenEmpty": true
64669
- }
64670
- }
64671
- },
64672
- {
64673
- "id": "",
64674
- "body": {
64675
- "package": "himalaya",
64676
- "type": "Spacer",
64677
- "props": {}
64678
- }
64679
- },
64680
- {
64681
- "id": "himi_owner_lite_maestro.history",
64682
- "body": {
64683
- "package": "himalaya",
64684
- "type": "Button",
64685
- "props": {
64686
- "title": "History",
64687
- "style": "link",
64688
- "size": "sm",
64689
- "fullWidth": false,
64690
- "action": {
64691
- "actionId": "himi.open",
64692
- "params": {
64693
- "screenId": "himi_owner_lite_maestro_history",
64694
- "title": "Conversations",
64695
- "subtitle": "Pick up where you left off."
64696
- }
64697
- }
64698
- }
64699
- }
64700
- },
64701
- {
64702
- "id": "himi_owner_lite_maestro.newChat",
64703
- "body": {
64704
- "package": "himalaya",
64705
- "type": "Button",
64706
- "props": {
64707
- "title": "New chat",
64708
- "style": "link",
64709
- "size": "sm",
64710
- "fullWidth": false,
64711
- "action": {
64712
- "actionId": "tier5.himiOwnerLiteMaestro.newChat"
64713
- }
64714
- }
64715
- }
64682
+ "topBar": {
64683
+ "actions": [
64684
+ {
64685
+ "id": "himi_owner_lite_maestro.history",
64686
+ "icon": "clock",
64687
+ "accessibilityLabel": "History",
64688
+ "onTap": {
64689
+ "actionId": "himi.open",
64690
+ "params": {
64691
+ "screenId": "himi_owner_lite_maestro_history",
64692
+ "title": "Conversations",
64693
+ "subtitle": "Pick up where you left off."
64716
64694
  }
64717
- ]
64718
- }
64719
- },
64720
- "modifiers": {
64721
- "background": {
64722
- "token": "surfacePrimary"
64723
- },
64724
- "padding": {
64725
- "leading": 16,
64726
- "trailing": 16,
64727
- "top": 4,
64728
- "bottom": 4
64695
+ },
64696
+ "hiddenPath": "$service:himiOwnerLiteMaestro.chatHidden",
64697
+ "hiddenPathScope": "screen"
64729
64698
  },
64730
- "hiddenPath": "$service:himiOwnerLiteMaestro.chatHidden"
64731
- }
64699
+ {
64700
+ "id": "himi_owner_lite_maestro.newChat",
64701
+ "icon": "edit",
64702
+ "accessibilityLabel": "New chat",
64703
+ "onTap": {
64704
+ "actionId": "tier5.himiOwnerLiteMaestro.newChat"
64705
+ },
64706
+ "hiddenPath": "$service:himiOwnerLiteMaestro.chatHidden",
64707
+ "hiddenPathScope": "screen"
64708
+ }
64709
+ ]
64732
64710
  },
64733
64711
  "stickyFooter": {
64734
64712
  "id": "himi_owner_lite_maestro.composer",
@@ -64826,50 +64804,111 @@ const SCREENS = runtimeSetting({
64826
64804
  }
64827
64805
  },
64828
64806
  {
64829
- "id": "form_maestro",
64807
+ "id": "",
64830
64808
  "body": {
64831
64809
  "package": "himalaya",
64832
- "type": "Form",
64810
+ "type": "HStack",
64833
64811
  "props": {
64834
- "id": "maestro",
64835
- "fields": [
64812
+ "spacing": 8,
64813
+ "alignment": "trailing",
64814
+ "children": [
64836
64815
  {
64837
- "id": "field_message",
64816
+ "id": "himi_owner_lite_maestro.input",
64838
64817
  "body": {
64839
64818
  "package": "himalaya",
64840
- "type": "FormField",
64819
+ "type": "TextField",
64841
64820
  "props": {
64842
- "id": "message",
64843
- "label": "",
64844
- "kind": "text",
64845
- "text": {
64846
- "value": "$service:himiOwnerLiteMaestro.input",
64847
- "placeholder": "Ask Maestro…",
64848
- "keyboard": "default",
64849
- "autoCapitalization": "sentences",
64850
- "multilineMaxLines": 4,
64851
- "onChange": {
64852
- "actionId": "tier5.himiOwnerLiteMaestro.setInput"
64853
- }
64854
- }
64821
+ "valuePath": "$service:himiOwnerLiteMaestro.input",
64822
+ "placeholder": "Ask Maestro…",
64823
+ "keyboard": "default",
64824
+ "autoCapitalization": "sentences",
64825
+ "multilineMaxLines": 4,
64826
+ "maxLength": 4000,
64827
+ "onChange": {
64828
+ "actionId": "tier5.himiOwnerLiteMaestro.setInput"
64829
+ },
64830
+ "borderless": true
64831
+ }
64832
+ },
64833
+ "modifiers": {
64834
+ "weight": 1,
64835
+ "accessibilityLabel": "Ask Maestro…",
64836
+ "background": {
64837
+ "token": "surfaceSecondary"
64838
+ },
64839
+ "cornerRadius": 22,
64840
+ "padding": {
64841
+ "leading": 16,
64842
+ "trailing": 12,
64843
+ "top": 11,
64844
+ "bottom": 11
64855
64845
  }
64856
64846
  }
64857
- }
64858
- ],
64859
- "submitButton": {
64860
- "id": "himi_owner_lite_maestro.send",
64861
- "body": {
64862
- "package": "himalaya",
64863
- "type": "Button",
64864
- "props": {
64865
- "title": "Send",
64866
- "style": "primary",
64867
- "action": {
64868
- "actionId": "tier5.himiOwnerLiteMaestro.submit"
64847
+ },
64848
+ {
64849
+ "id": "",
64850
+ "body": {
64851
+ "package": "himalaya",
64852
+ "type": "ZStack",
64853
+ "props": {
64854
+ "alignment": "center",
64855
+ "children": [
64856
+ {
64857
+ "id": "himi_owner_lite_maestro.send_off",
64858
+ "body": {
64859
+ "package": "himalaya",
64860
+ "type": "Icon",
64861
+ "props": {
64862
+ "name": "send",
64863
+ "size": 20,
64864
+ "tint": "textTertiary"
64865
+ }
64866
+ },
64867
+ "modifiers": {
64868
+ "accessibilityRole": "decorative",
64869
+ "width": 44,
64870
+ "height": 44,
64871
+ "cornerRadius": 22,
64872
+ "background": {
64873
+ "token": "surfaceSecondary"
64874
+ }
64875
+ }
64876
+ },
64877
+ {
64878
+ "id": "himi_owner_lite_maestro.send",
64879
+ "body": {
64880
+ "package": "himalaya",
64881
+ "type": "Icon",
64882
+ "props": {
64883
+ "name": "send",
64884
+ "size": 20,
64885
+ "tint": "textOnAccent"
64886
+ }
64887
+ },
64888
+ "modifiers": {
64889
+ "accessibilityRole": "button",
64890
+ "width": 44,
64891
+ "height": 44,
64892
+ "cornerRadius": 22,
64893
+ "background": {
64894
+ "token": "accentPrimary"
64895
+ },
64896
+ "accessibilityLabel": "Send",
64897
+ "onTap": {
64898
+ "actionId": "tier5.himiOwnerLiteMaestro.submit"
64899
+ },
64900
+ "hiddenPath": "$service:himiOwnerLiteMaestro.noInput"
64901
+ }
64902
+ }
64903
+ ]
64869
64904
  }
64905
+ },
64906
+ "modifiers": {
64907
+ "width": 44,
64908
+ "height": 44
64870
64909
  }
64871
64910
  }
64872
- }
64911
+ ]
64873
64912
  }
64874
64913
  }
64875
64914
  }
@@ -64896,8 +64935,7 @@ const SCREENS = runtimeSetting({
64896
64935
  },
64897
64936
  "hostTitle": {
64898
64937
  "title": "Maestro",
64899
- "subtitle": "Your business assistant, by Symphony.",
64900
- "replaces": "himi_owner_lite_maestro.header"
64938
+ "replaces": "himi_owner_lite_maestro.header.title"
64901
64939
  }
64902
64940
  },
64903
64941
  "himi_owner_lite_maestro_history": {
@@ -65034,7 +65072,7 @@ const SCREENS = runtimeSetting({
65034
65072
  "package": "himalaya",
65035
65073
  "type": "Icon",
65036
65074
  "props": {
65037
- "name": "edit",
65075
+ "name": "chat",
65038
65076
  "size": 20,
65039
65077
  "tint": "accentPrimary"
65040
65078
  }
@@ -65120,8 +65158,7 @@ const SCREENS = runtimeSetting({
65120
65158
  "screenId": "himi_owner_lite_maestro",
65121
65159
  "conversationId": "$item.id",
65122
65160
  "n": "$item.stamp",
65123
- "title": "Maestro",
65124
- "subtitle": "Your business assistant, by Symphony."
65161
+ "title": "Maestro"
65125
65162
  }
65126
65163
  }
65127
65164
  }
@@ -65209,6 +65246,9 @@ const SCREENS = runtimeSetting({
65209
65246
  "minBinaryVersion": "0.1.0",
65210
65247
  "bundleVersion": "0.0.1"
65211
65248
  },
65249
+ "topBar": {
65250
+ "actions": []
65251
+ },
65212
65252
  "hostTitle": {
65213
65253
  "title": "Conversations",
65214
65254
  "subtitle": "Pick up where you left off.",
@@ -86626,14 +86666,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
86626
86666
  "fullWidth": true,
86627
86667
  "leadingIcon": "ai",
86628
86668
  "action": {
86629
- "actionId": "himi.open",
86669
+ "actionId": "tier5.himiOwnerLiteOrder.askMaestro",
86630
86670
  "params": {
86631
- "screenId": "himi_owner_lite_maestro",
86632
- "kind": "order",
86633
- "id": "$service:himiOwnerLiteOrder.id",
86634
- "subject": "$service:himiOwnerLiteOrder.title",
86635
- "title": "Maestro",
86636
- "subtitle": "Your business assistant, by Symphony."
86671
+ "kind": "order"
86637
86672
  }
86638
86673
  }
86639
86674
  }
@@ -91591,14 +91626,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
91591
91626
  "fullWidth": true,
91592
91627
  "leadingIcon": "ai",
91593
91628
  "action": {
91594
- "actionId": "himi.open",
91629
+ "actionId": "tier5.ownerBooking.askMaestro",
91595
91630
  "params": {
91596
- "screenId": "himi_owner_lite_maestro",
91597
- "kind": "booking",
91598
- "id": "$service:ownerBooking.id",
91599
- "subject": "$service:ownerBooking.title",
91600
- "title": "Maestro",
91601
- "subtitle": "Your business assistant, by Symphony."
91631
+ "kind": "booking"
91602
91632
  }
91603
91633
  }
91604
91634
  }
@@ -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() : "";