@fayz-ai/admin 0.14.0 → 0.15.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 (292) hide show
  1. package/dist/{ScheduleEditor-S3QI5MHO.js → ScheduleEditor-57AYL7B6.js} +4 -4
  2. package/dist/{ScheduleEditor-S3QI5MHO.js.map → ScheduleEditor-57AYL7B6.js.map} +1 -1
  3. package/dist/SubscriptionPage-FE2B5ZXF.js +7 -0
  4. package/dist/{SubscriptionPage-4KP7DKA2.js.map → SubscriptionPage-FE2B5ZXF.js.map} +1 -1
  5. package/dist/app/AdminShell.d.ts +11 -1
  6. package/dist/app/AdminShell.d.ts.map +1 -1
  7. package/dist/app/admin-app.d.ts.map +1 -1
  8. package/dist/app/config.d.ts +34 -3
  9. package/dist/app/config.d.ts.map +1 -1
  10. package/dist/app/core-entities.d.ts.map +1 -1
  11. package/dist/app/derive-contract.d.ts.map +1 -1
  12. package/dist/app/scaffold.d.ts.map +1 -1
  13. package/dist/{chunk-OI7RYSTM.js → chunk-45EZQW4M.js} +22 -7
  14. package/dist/chunk-45EZQW4M.js.map +1 -0
  15. package/dist/{chunk-B6NVEKAJ.js → chunk-IPWXA46H.js} +3 -3
  16. package/dist/{chunk-B6NVEKAJ.js.map → chunk-IPWXA46H.js.map} +1 -1
  17. package/dist/{chunk-PNAJODZM.js → chunk-OB7ZSTQD.js} +13 -3
  18. package/dist/chunk-OB7ZSTQD.js.map +1 -0
  19. package/dist/components/AskAI.d.ts +71 -0
  20. package/dist/components/AskAI.d.ts.map +1 -0
  21. package/dist/components/RightRail.d.ts +10 -2
  22. package/dist/components/RightRail.d.ts.map +1 -1
  23. package/dist/components/RightRailPage.d.ts +30 -0
  24. package/dist/components/RightRailPage.d.ts.map +1 -0
  25. package/dist/components/chat/AgentAvatar.d.ts +43 -0
  26. package/dist/components/chat/AgentAvatar.d.ts.map +1 -0
  27. package/dist/components/chat/AgentIntro.d.ts +25 -0
  28. package/dist/components/chat/AgentIntro.d.ts.map +1 -0
  29. package/dist/components/chat/AssistantActivityBar.d.ts +7 -2
  30. package/dist/components/chat/AssistantActivityBar.d.ts.map +1 -1
  31. package/dist/components/chat/AssistantRecordingView.d.ts +16 -0
  32. package/dist/components/chat/AssistantRecordingView.d.ts.map +1 -0
  33. package/dist/components/chat/ChatAttachments.d.ts +12 -1
  34. package/dist/components/chat/ChatAttachments.d.ts.map +1 -1
  35. package/dist/components/chat/ChatComposer.d.ts +1 -4
  36. package/dist/components/chat/ChatComposer.d.ts.map +1 -1
  37. package/dist/components/chat/ChatConversation.d.ts +1 -1
  38. package/dist/components/chat/ChatConversation.d.ts.map +1 -1
  39. package/dist/components/chat/ChatFab.d.ts.map +1 -1
  40. package/dist/components/chat/ChatHistory.d.ts.map +1 -1
  41. package/dist/components/chat/ChatMessages.d.ts +1 -1
  42. package/dist/components/chat/ChatMessages.d.ts.map +1 -1
  43. package/dist/components/chat/ChatSuggestions.d.ts.map +1 -1
  44. package/dist/components/chat/ConnectorSuggestionCard.d.ts +3 -0
  45. package/dist/components/chat/ConnectorSuggestionCard.d.ts.map +1 -1
  46. package/dist/components/chat/StaffHireView.d.ts +21 -0
  47. package/dist/components/chat/StaffHireView.d.ts.map +1 -0
  48. package/dist/components/chat/StaffPitchCard.d.ts +15 -0
  49. package/dist/components/chat/StaffPitchCard.d.ts.map +1 -0
  50. package/dist/components/chat/StaffSwitcher.d.ts +23 -0
  51. package/dist/components/chat/StaffSwitcher.d.ts.map +1 -0
  52. package/dist/components/chat/activity-icons.d.ts +16 -0
  53. package/dist/components/chat/activity-icons.d.ts.map +1 -0
  54. package/dist/components/chat/index.d.ts +2 -0
  55. package/dist/components/chat/index.d.ts.map +1 -1
  56. package/dist/components/connect/ConnectConsentPage.d.ts.map +1 -1
  57. package/dist/components/connect/ConnectorDetail.d.ts.map +1 -1
  58. package/dist/components/connect/ConnectorRuns.d.ts.map +1 -1
  59. package/dist/components/connect/ConnectorsPanel.d.ts.map +1 -1
  60. package/dist/components/connect/ConnectorsTab.d.ts.map +1 -1
  61. package/dist/components/connect/connector-map.generated.d.ts.map +1 -1
  62. package/dist/components/connect/index.d.ts +3 -0
  63. package/dist/components/connect/index.d.ts.map +1 -1
  64. package/dist/components/connect/model.d.ts +55 -0
  65. package/dist/components/connect/model.d.ts.map +1 -1
  66. package/dist/components/organization/PermissionMatrixEditor.d.ts.map +1 -1
  67. package/dist/components/organization/PermissionProfilesTab.d.ts.map +1 -1
  68. package/dist/components/organization/TeamTab.d.ts.map +1 -1
  69. package/dist/components/organization/index.d.ts +0 -2
  70. package/dist/components/organization/index.d.ts.map +1 -1
  71. package/dist/components/plugins/PluginSettingsPanel.d.ts +1 -2
  72. package/dist/components/plugins/PluginSettingsPanel.d.ts.map +1 -1
  73. package/dist/components/plugins/SettingsTabs.d.ts +33 -0
  74. package/dist/components/plugins/SettingsTabs.d.ts.map +1 -0
  75. package/dist/components/rail-pages.d.ts +17 -0
  76. package/dist/components/rail-pages.d.ts.map +1 -0
  77. package/dist/components/right-rail.d.ts +95 -1
  78. package/dist/components/right-rail.d.ts.map +1 -1
  79. package/dist/components/settings/ConnectedCompanySettings.d.ts.map +1 -1
  80. package/dist/components/settings/ConnectedUserProfile.d.ts.map +1 -1
  81. package/dist/components/settings/LocationsCrudPage.d.ts.map +1 -1
  82. package/dist/components/settings/MyRecordPanel.d.ts +3 -0
  83. package/dist/components/settings/MyRecordPanel.d.ts.map +1 -0
  84. package/dist/components/settings/MyWorkspaceCard.d.ts +3 -0
  85. package/dist/components/settings/MyWorkspaceCard.d.ts.map +1 -0
  86. package/dist/components/shared/ContactPicker.d.ts +26 -12
  87. package/dist/components/shared/ContactPicker.d.ts.map +1 -1
  88. package/dist/crud/CrudAgentSurface.d.ts +12 -0
  89. package/dist/crud/CrudAgentSurface.d.ts.map +1 -0
  90. package/dist/crud/CrudDetailPage.d.ts +19 -1
  91. package/dist/crud/CrudDetailPage.d.ts.map +1 -1
  92. package/dist/crud/CrudFormPage.d.ts +23 -1
  93. package/dist/crud/CrudFormPage.d.ts.map +1 -1
  94. package/dist/crud/CrudListView.d.ts +19 -14
  95. package/dist/crud/CrudListView.d.ts.map +1 -1
  96. package/dist/crud/CrudPage.d.ts +17 -1
  97. package/dist/crud/CrudPage.d.ts.map +1 -1
  98. package/dist/crud/CrudRecordModal.d.ts +9 -3
  99. package/dist/crud/CrudRecordModal.d.ts.map +1 -1
  100. package/dist/crud/LookupCreateInline.d.ts +15 -0
  101. package/dist/crud/LookupCreateInline.d.ts.map +1 -0
  102. package/dist/crud/archetype-lookup.d.ts +19 -6
  103. package/dist/crud/archetype-lookup.d.ts.map +1 -1
  104. package/dist/crud/archetypes/AddressesTab.d.ts.map +1 -1
  105. package/dist/crud/archetypes/LocationDetailTabs.d.ts +3 -2
  106. package/dist/crud/archetypes/LocationDetailTabs.d.ts.map +1 -1
  107. package/dist/crud/archetypes/OrderDetailView.d.ts +4 -1
  108. package/dist/crud/archetypes/OrderDetailView.d.ts.map +1 -1
  109. package/dist/crud/archetypes/OrderFormView.d.ts +13 -2
  110. package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
  111. package/dist/crud/archetypes/PersonDetailTabs.d.ts +2 -1
  112. package/dist/crud/archetypes/PersonDetailTabs.d.ts.map +1 -1
  113. package/dist/crud/archetypes/PersonPicker.d.ts.map +1 -1
  114. package/dist/crud/createCrudPage.d.ts +8 -0
  115. package/dist/crud/createCrudPage.d.ts.map +1 -1
  116. package/dist/crud/useLookupCreate.d.ts +30 -0
  117. package/dist/crud/useLookupCreate.d.ts.map +1 -0
  118. package/dist/data/client.d.ts.map +1 -1
  119. package/dist/hooks/useAITools.d.ts +1 -0
  120. package/dist/hooks/useAITools.d.ts.map +1 -1
  121. package/dist/hooks/useChat.d.ts.map +1 -1
  122. package/dist/index.d.ts +21 -6
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +15362 -8467
  125. package/dist/index.js.map +1 -1
  126. package/dist/lib/agent-staff.d.ts +117 -0
  127. package/dist/lib/agent-staff.d.ts.map +1 -0
  128. package/dist/lib/agent-surface.d.ts +4 -0
  129. package/dist/lib/agent-surface.d.ts.map +1 -1
  130. package/dist/lib/agent-threads.d.ts +15 -0
  131. package/dist/lib/agent-threads.d.ts.map +1 -0
  132. package/dist/lib/ai-tool-handlers.d.ts.map +1 -1
  133. package/dist/lib/assistant-activity.d.ts +47 -4
  134. package/dist/lib/assistant-activity.d.ts.map +1 -1
  135. package/dist/lib/assistant-invite.d.ts +20 -1
  136. package/dist/lib/assistant-invite.d.ts.map +1 -1
  137. package/dist/lib/assistant-text.d.ts +9 -0
  138. package/dist/lib/assistant-text.d.ts.map +1 -0
  139. package/dist/lib/chat-upload.d.ts +12 -0
  140. package/dist/lib/chat-upload.d.ts.map +1 -0
  141. package/dist/lib/core-ai-tools.d.ts +17 -0
  142. package/dist/lib/core-ai-tools.d.ts.map +1 -1
  143. package/dist/lib/fayz-agent.d.ts +9 -0
  144. package/dist/lib/fayz-agent.d.ts.map +1 -1
  145. package/dist/lib/staff-cards.d.ts +11 -0
  146. package/dist/lib/staff-cards.d.ts.map +1 -0
  147. package/dist/lib/unit-ai-handlers.d.ts +2 -0
  148. package/dist/lib/unit-ai-handlers.d.ts.map +1 -0
  149. package/dist/lib/unit-ai-tools.d.ts +3 -0
  150. package/dist/lib/unit-ai-tools.d.ts.map +1 -0
  151. package/dist/onboarding/GettingStartedWidget.d.ts +13 -0
  152. package/dist/onboarding/GettingStartedWidget.d.ts.map +1 -0
  153. package/dist/onboarding/WorkspaceSetupFlow.d.ts +24 -0
  154. package/dist/onboarding/WorkspaceSetupFlow.d.ts.map +1 -0
  155. package/dist/onboarding/WorkspaceSetupGate.d.ts +25 -0
  156. package/dist/onboarding/WorkspaceSetupGate.d.ts.map +1 -0
  157. package/dist/onboarding/analyze-site.d.ts +23 -0
  158. package/dist/onboarding/analyze-site.d.ts.map +1 -0
  159. package/dist/onboarding/backend.d.ts +44 -0
  160. package/dist/onboarding/backend.d.ts.map +1 -0
  161. package/dist/onboarding/checklist.d.ts +55 -0
  162. package/dist/onboarding/checklist.d.ts.map +1 -0
  163. package/dist/onboarding/connector-options.d.ts +52 -0
  164. package/dist/onboarding/connector-options.d.ts.map +1 -0
  165. package/dist/onboarding/decide.d.ts +36 -0
  166. package/dist/onboarding/decide.d.ts.map +1 -0
  167. package/dist/onboarding/index.d.ts +19 -0
  168. package/dist/onboarding/index.d.ts.map +1 -0
  169. package/dist/onboarding/infer-vertical.d.ts +2 -0
  170. package/dist/onboarding/infer-vertical.d.ts.map +1 -0
  171. package/dist/onboarding/packs/beauty.d.ts +4 -0
  172. package/dist/onboarding/packs/beauty.d.ts.map +1 -0
  173. package/dist/onboarding/packs/food.d.ts +4 -0
  174. package/dist/onboarding/packs/food.d.ts.map +1 -0
  175. package/dist/onboarding/packs/index.d.ts +17 -0
  176. package/dist/onboarding/packs/index.d.ts.map +1 -0
  177. package/dist/onboarding/packs/retail.d.ts +8 -0
  178. package/dist/onboarding/packs/retail.d.ts.map +1 -0
  179. package/dist/onboarding/questions.d.ts +41 -0
  180. package/dist/onboarding/questions.d.ts.map +1 -0
  181. package/dist/onboarding/resolve.d.ts +12 -0
  182. package/dist/onboarding/resolve.d.ts.map +1 -0
  183. package/dist/onboarding/steps.d.ts +31 -0
  184. package/dist/onboarding/steps.d.ts.map +1 -0
  185. package/dist/onboarding/store.d.ts +17 -0
  186. package/dist/onboarding/store.d.ts.map +1 -0
  187. package/dist/onboarding/submit.d.ts +25 -0
  188. package/dist/onboarding/submit.d.ts.map +1 -0
  189. package/dist/onboarding/tasks.d.ts +28 -0
  190. package/dist/onboarding/tasks.d.ts.map +1 -0
  191. package/dist/onboarding/types.d.ts +39 -0
  192. package/dist/onboarding/types.d.ts.map +1 -0
  193. package/dist/onboarding/useWorkspaceSetupGate.d.ts +36 -0
  194. package/dist/onboarding/useWorkspaceSetupGate.d.ts.map +1 -0
  195. package/dist/org/context.d.ts +10 -0
  196. package/dist/org/context.d.ts.map +1 -1
  197. package/dist/org/index.js +2 -2
  198. package/dist/org/self.d.ts +50 -0
  199. package/dist/org/self.d.ts.map +1 -0
  200. package/dist/plugins/QuickActionsButton.d.ts.map +1 -1
  201. package/dist/stores/chat.store.d.ts +150 -2
  202. package/dist/stores/chat.store.d.ts.map +1 -1
  203. package/dist/tasks/TasksRailPanel.d.ts +4 -0
  204. package/dist/tasks/TasksRailPanel.d.ts.map +1 -0
  205. package/dist/tasks/components/TaskCard.d.ts +11 -0
  206. package/dist/tasks/components/TaskCard.d.ts.map +1 -0
  207. package/dist/tasks/components/TaskDetail.d.ts +5 -0
  208. package/dist/tasks/components/TaskDetail.d.ts.map +1 -0
  209. package/dist/tasks/components/TaskLabelBadge.d.ts +9 -0
  210. package/dist/tasks/components/TaskLabelBadge.d.ts.map +1 -0
  211. package/dist/tasks/components/TaskPriorityBadge.d.ts +7 -0
  212. package/dist/tasks/components/TaskPriorityBadge.d.ts.map +1 -0
  213. package/dist/tasks/components/TaskQuickAdd.d.ts +5 -0
  214. package/dist/tasks/components/TaskQuickAdd.d.ts.map +1 -0
  215. package/dist/tasks/components/TaskSourceBadge.d.ts +5 -0
  216. package/dist/tasks/components/TaskSourceBadge.d.ts.map +1 -0
  217. package/dist/tasks/components/TaskStatusGroup.d.ts +17 -0
  218. package/dist/tasks/components/TaskStatusGroup.d.ts.map +1 -0
  219. package/dist/tasks/components/TasksFilterBar.d.ts +3 -0
  220. package/dist/tasks/components/TasksFilterBar.d.ts.map +1 -0
  221. package/dist/tasks/components/TasksPanel.d.ts +14 -0
  222. package/dist/tasks/components/TasksPanel.d.ts.map +1 -0
  223. package/dist/tasks/data/mock.d.ts +3 -0
  224. package/dist/tasks/data/mock.d.ts.map +1 -0
  225. package/dist/tasks/data/supabase.d.ts +3 -0
  226. package/dist/tasks/data/supabase.d.ts.map +1 -0
  227. package/dist/tasks/entity.d.ts +11 -0
  228. package/dist/tasks/entity.d.ts.map +1 -0
  229. package/dist/tasks/index.d.ts +17 -0
  230. package/dist/tasks/index.d.ts.map +1 -0
  231. package/dist/tasks/registry.d.ts +3 -0
  232. package/dist/tasks/registry.d.ts.map +1 -0
  233. package/dist/tasks/store.d.ts +34 -0
  234. package/dist/tasks/store.d.ts.map +1 -0
  235. package/dist/tasks/types.d.ts +89 -0
  236. package/dist/tasks/types.d.ts.map +1 -0
  237. package/dist/theme/index.d.ts +1 -1
  238. package/dist/theme/index.d.ts.map +1 -1
  239. package/dist/theme/utils.d.ts +14 -0
  240. package/dist/theme/utils.d.ts.map +1 -1
  241. package/dist/types/index.d.ts +0 -1
  242. package/dist/types/index.d.ts.map +1 -1
  243. package/dist/types/plugins.d.ts +3 -0
  244. package/dist/types/plugins.d.ts.map +1 -1
  245. package/dist/units/MemberAccessRailPage.d.ts +19 -0
  246. package/dist/units/MemberAccessRailPage.d.ts.map +1 -0
  247. package/dist/units/MemberUnitsCell.d.ts +11 -0
  248. package/dist/units/MemberUnitsCell.d.ts.map +1 -0
  249. package/dist/units/PersonUnitsTab.d.ts +5 -0
  250. package/dist/units/PersonUnitsTab.d.ts.map +1 -0
  251. package/dist/units/UnitMembersTab.d.ts +5 -0
  252. package/dist/units/UnitMembersTab.d.ts.map +1 -0
  253. package/dist/units/UnitMenuSection.d.ts +15 -0
  254. package/dist/units/UnitMenuSection.d.ts.map +1 -0
  255. package/dist/units/UnitModeCard.d.ts +3 -0
  256. package/dist/units/UnitModeCard.d.ts.map +1 -0
  257. package/dist/units/UnitRailPage.d.ts +10 -0
  258. package/dist/units/UnitRailPage.d.ts.map +1 -0
  259. package/dist/units/UnitSwitcher.d.ts +5 -0
  260. package/dist/units/UnitSwitcher.d.ts.map +1 -0
  261. package/dist/units/UnitsSettingsPage.d.ts +3 -0
  262. package/dist/units/UnitsSettingsPage.d.ts.map +1 -0
  263. package/dist/units/cache.d.ts +26 -0
  264. package/dist/units/cache.d.ts.map +1 -0
  265. package/dist/units/data.d.ts +111 -0
  266. package/dist/units/data.d.ts.map +1 -0
  267. package/dist/units/device.d.ts +26 -0
  268. package/dist/units/device.d.ts.map +1 -0
  269. package/dist/units/entry.d.ts +52 -0
  270. package/dist/units/entry.d.ts.map +1 -0
  271. package/dist/units/geo.d.ts +18 -0
  272. package/dist/units/geo.d.ts.map +1 -0
  273. package/dist/units/index.d.ts +18 -0
  274. package/dist/units/index.d.ts.map +1 -0
  275. package/dist/units/store.d.ts +32 -0
  276. package/dist/units/store.d.ts.map +1 -0
  277. package/dist/units/useUnitBootstrap.d.ts +10 -0
  278. package/dist/units/useUnitBootstrap.d.ts.map +1 -0
  279. package/package.json +7 -7
  280. package/dist/SubscriptionPage-4KP7DKA2.js +0 -7
  281. package/dist/chunk-OI7RYSTM.js.map +0 -1
  282. package/dist/chunk-PNAJODZM.js.map +0 -1
  283. package/dist/components/organization/OrgInitializer.d.ts +0 -7
  284. package/dist/components/organization/OrgInitializer.d.ts.map +0 -1
  285. package/dist/components/organization/OrgSwitcher.d.ts +0 -7
  286. package/dist/components/organization/OrgSwitcher.d.ts.map +0 -1
  287. package/dist/components/organization/TenantOnboarding.d.ts +0 -9
  288. package/dist/components/organization/TenantOnboarding.d.ts.map +0 -1
  289. package/dist/components/shared/create-person.d.ts +0 -20
  290. package/dist/components/shared/create-person.d.ts.map +0 -1
  291. package/dist/types/entity-lookup.d.ts +0 -27
  292. package/dist/types/entity-lookup.d.ts.map +0 -1
@@ -0,0 +1,117 @@
1
+ import type { AgentRole, AgentStaffDef } from '@fayz-ai/core';
2
+ import { type ChatMessage } from '../stores/chat.store';
3
+ /**
4
+ * The app's staff, resolved — who is on the payroll, who is active, and who a
5
+ * given role belongs to.
6
+ *
7
+ * The app casts the roles (`chat.staff`); everything downstream reads from
8
+ * here. Two consequences worth keeping in mind:
9
+ *
10
+ * - The ACTIVE agent scopes the toolset. Only its role's tools (plus the
11
+ * shared primitives) are advertised, which is what makes two agents behave
12
+ * differently rather than merely sound different.
13
+ * - An agent nobody hired is not degraded, it is absent: its tools never enter
14
+ * the catalogue, so it cannot promise work it has no way to do. The colleague
15
+ * pitch is what the user sees instead.
16
+ *
17
+ * An app with no cast keeps exactly the behaviour it had before: `roster()`
18
+ * comes back empty and every consumer falls through to the single assistant.
19
+ */
20
+ /** The feature id that hires a role, when the cast doesn't name its own. */
21
+ export declare function agentFeatureId(role: AgentRole): string;
22
+ interface StaffState {
23
+ /** The cast, in the order the app declared it. */
24
+ roster: AgentStaffDef[];
25
+ /** Role of the agent currently answering. Null before a cast is registered. */
26
+ activeRole: AgentRole | null;
27
+ /** The team picker is open. Shared because the control and the thing it
28
+ * opens live on opposite sides of the shell: the chevron is on the rail's
29
+ * tab, the list is inside the panel. */
30
+ pickerOpen: boolean;
31
+ setRoster: (roster: AgentStaffDef[]) => void;
32
+ setActiveRole: (role: AgentRole | null) => void;
33
+ setPickerOpen: (open: boolean) => void;
34
+ }
35
+ export declare const useAgentStaffStore: import("zustand").UseBoundStore<import("zustand").StoreApi<StaffState>>;
36
+ /** Who receives what belongs to nobody. Falls back to `setup`, then the first
37
+ * member — an app that forgets to flag a host still has someone answering. */
38
+ export declare function hostOf(roster: AgentStaffDef[]): AgentStaffDef | undefined;
39
+ export declare function getRoster(): AgentStaffDef[];
40
+ export declare function getHost(): AgentStaffDef | undefined;
41
+ export declare function agentForRole(role: AgentRole): AgentStaffDef | undefined;
42
+ /** The agent answering right now, or the host before anyone has been picked. */
43
+ export declare function getActiveAgent(): AgentStaffDef | undefined;
44
+ /**
45
+ * Is this agent on the payroll?
46
+ *
47
+ * Deliberately NOT `useAccess().entitled()`. The plan engine treats an
48
+ * undeclared feature as open (only an explicit `false` denies), which is right
49
+ * for a module the app forgot to gate and exactly wrong for something sold per
50
+ * seat: every paid agent would ship free. So hiring is opt-in — the plan has to
51
+ * say `true`.
52
+ */
53
+ export declare function isAgentHired(member: AgentStaffDef): boolean;
54
+ /** The cast this tenant can actually talk to. */
55
+ export declare function hiredRoster(): AgentStaffDef[];
56
+ /**
57
+ * Put `role` on duty: their thread comes forward, everyone else's is parked.
58
+ *
59
+ * The two moves are one action because they are one thing to the user — asking
60
+ * a different colleague is a different conversation. `notice` is what the
61
+ * transcript shows for the change, so a hand-off is never a silent swap of who
62
+ * is talking.
63
+ */
64
+ export declare function switchToAgent(role: AgentRole, notice?: ChatMessage['notice']): void;
65
+ /**
66
+ * Raise the panel with `role` on duty, and say whether the caller may proceed.
67
+ *
68
+ * This is what turns a button on a page into a colleague picking up: pressing
69
+ * "gravar o atendimento" on a client record does not start a recording behind a
70
+ * generic assistant, it opens the Auxiliar's thread and starts it there — same
71
+ * identity, same tools, same transcript afterwards.
72
+ *
73
+ * Returns `false` for exactly one case: the role IS cast and nobody hired them.
74
+ * The pitch is up, and the caller must not do the work — starting anyway would
75
+ * hand out the paid job while the panel is still selling it. An app that never
76
+ * cast the role gets `true` and the plain assistant, unchanged.
77
+ */
78
+ export declare function openAssistantAs(role: AgentRole): boolean;
79
+ /**
80
+ * The colleague being introduced right now.
81
+ *
82
+ * A store rather than a prop because the request comes from two places that do
83
+ * not share a parent: the team picker in the header, and the card the agent
84
+ * itself renders mid-conversation when it hits work it has no tools for. Both
85
+ * mean the same thing, so both land here and the panel answers once.
86
+ */
87
+ interface MeetState {
88
+ meeting: AgentStaffDef | null;
89
+ meet: (member: AgentStaffDef) => void;
90
+ dismissMeeting: () => void;
91
+ }
92
+ export declare const useMeetAgentStore: import("zustand").UseBoundStore<import("zustand").StoreApi<MeetState>>;
93
+ /**
94
+ * Who the model is this turn, and who it works with.
95
+ *
96
+ * The colleagues matter as much as the persona: without them the agent either
97
+ * refuses what isn't its job or improvises past its toolset. Un-hired ones are
98
+ * listed too, deliberately — recognising "that's Nina's work" and offering her
99
+ * is the only honest thing to say when the tools to do it are absent.
100
+ *
101
+ * Empty string when the app cast nobody, so the guidance is unchanged.
102
+ */
103
+ export declare function buildPersonaGuidance(): string;
104
+ /** Publishes the app's cast into the store for the lifetime of the shell. */
105
+ export declare function useRegisterStaff(staff: AgentStaffDef[] | undefined): void;
106
+ export declare function useRoster(): AgentStaffDef[];
107
+ /** Reactive counterpart of {@link getActiveAgent}. */
108
+ export declare function useActiveAgent(): AgentStaffDef | undefined;
109
+ /** Reactive counterpart of {@link isAgentHired}. */
110
+ export declare function useAgentHired(member: AgentStaffDef | undefined): boolean;
111
+ /** The cast split by payroll, so the switcher can show both in one pass. */
112
+ export declare function useStaffRoster(): {
113
+ hired: AgentStaffDef[];
114
+ open: AgentStaffDef[];
115
+ };
116
+ export {};
117
+ //# sourceMappingURL=agent-staff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-staff.d.ts","sourceRoot":"","sources":["../../src/lib/agent-staff.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAQ,MAAM,eAAe,CAAA;AAInE,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAErE;;;;;;;;;;;;;;;;GAgBG;AAEH,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEtD;AAED,UAAU,UAAU;IAClB,kDAAkD;IAClD,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,+EAA+E;IAC/E,UAAU,EAAE,SAAS,GAAG,IAAI,CAAA;IAC5B;;6CAEyC;IACzC,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAA;IAC5C,aAAa,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/C,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC;AAED,eAAO,MAAM,kBAAkB,yEAc5B,CAAA;AAEH;+EAC+E;AAC/E,wBAAgB,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,GAAG,SAAS,CAEzE;AAED,wBAAgB,SAAS,IAAI,aAAa,EAAE,CAE3C;AAED,wBAAgB,OAAO,IAAI,aAAa,GAAG,S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4 @@
1
+ import type { AgentRole } from '@fayz-ai/core';
1
2
  import type { PluginAITool } from '../types/plugins';
2
3
  /**
3
4
  * Agent Surface Contract — how the screen the user is looking at RIGHT NOW
@@ -44,6 +45,9 @@ export interface AgentSurfaceContribution {
44
45
  id: string;
45
46
  /** Plugin that owns the surface, used for tool ranking. */
46
47
  pluginId?: string;
48
+ /** Colleague this surface's tools belong to, inherited by any tool that does
49
+ * not name its own. Omit to leave them shared by everyone. */
50
+ role?: AgentRole;
47
51
  /** Snapshot of what's on screen. Called fresh at send time — never cached. */
48
52
  describe?: () => AgentSurfaceSnapshot;
49
53
  /** Guidance appended to the request ONLY while this surface is mounted. */
@@ -1 +1 @@
1
- {"version":3,"file":"agent-surface.d.ts","sourceRoot":"","sources":["../../src/lib/agent-surface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,wEAAwE;IACxE,MAAM,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAA;CAC3F;AAED,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,IAAI,EAAE,YAAY,CAAA;IAClB,iFAAiF;IACjF,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACvE;AAED,MAAM,WAAW,wBAAwB;IACvC,wEAAwE;IAC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,eAAe,IAAI,YAAY,EAAE,CAMhD;AAED,6EAA6E;AAC7E,wBAAgB,uBAAuB,IAAI;IACzC,QAAQ,EAAE,oBAAoB,EAAE,CAAA;IAChC,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB,CAeA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Which colleague a past conversation belongs to.
3
+ *
4
+ * The broker stores one agent per project, so a conversation it hands back
5
+ * carries no idea of who was speaking. Until it does, the surface remembers:
6
+ * every thread the user starts is tagged here as it gets its server id, and the
7
+ * history drawer reads the tag to show one colleague's conversations at a time.
8
+ *
9
+ * Local by design and deliberately lossy — a thread from another browser, or
10
+ * from before the cast existed, has no tag and belongs to nobody. The drawer
11
+ * shows those to the host rather than hiding them.
12
+ */
13
+ export declare function tagConversation(conversationId: string, role: string): void;
14
+ export declare function roleOfConversation(conversationId: string): string | null;
15
+ //# sourceMappingURL=agent-threads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-threads.d.ts","sourceRoot":"","sources":["../../src/lib/agent-threads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA2BH,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAK1E;AAED,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAExE"}
@@ -1 +1 @@
1
- {"version":3,"file":"ai-tool-handlers.d.ts","sourceRoot":"","sources":["../../src/lib/ai-tool-handlers.ts"],"names":[],"mappings":"AAgFA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,YAAY,EAEZ,iBAAiB,EACjB,UAAU,EACX,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEvE;;;;;;;;;;;;;;;;;GAiBG;AAEH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aD;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAehC"}
@@ -1,3 +1,4 @@
1
+ import type { AgentRole } from '@fayz-ai/core';
1
2
  /**
2
3
  * Assistant Activity Contract — what the app is DOING right now (a recording
3
4
  * running, a task in flight), and how to end it from wherever the user is.
@@ -10,8 +11,15 @@
10
11
  *
11
12
  * Sibling of `lib/agent-surface.ts`: that one carries what the screen KNOWS.
12
13
  */
13
- export type AssistantActivityState = 'running' | 'paused' | 'done';
14
- export type AssistantActionIntent = 'pause' | 'resume' | 'stop' | 'open' | 'discard' | 'generate';
14
+ /**
15
+ * `pending` is the activity BEFORE its first byte: announced, described, and
16
+ * waiting on the one decision that has to happen before it starts. It exists so
17
+ * that gate stops being a modal — the panel that will carry the session is also
18
+ * where the session is agreed to, instead of a dialog over the page plus a
19
+ * panel behind it, two surfaces for one act.
20
+ */
21
+ export type AssistantActivityState = 'pending' | 'running' | 'paused' | 'done';
22
+ export type AssistantActionIntent = 'start' | 'cancel' | 'pause' | 'resume' | 'stop' | 'open' | 'discard' | 'generate';
15
23
  export interface AssistantActivityAction {
16
24
  intent: AssistantActionIntent;
17
25
  label: string;
@@ -34,6 +42,22 @@ export interface AssistantActivity {
34
42
  */
35
43
  elapsedMs?: number;
36
44
  actions?: AssistantActivityAction[];
45
+ /**
46
+ * What must be read and agreed to before a `pending` activity may start. The
47
+ * shell renders the sentence and the checkbox and withholds the `start`
48
+ * action until it is ticked; the OWNER decides what it says and what starting
49
+ * does. Recording consent is the first caller, but the shape is the same for
50
+ * a cost warning or any other "are you sure" that precedes work.
51
+ *
52
+ * Data only, like the actions: a component here would put @fayz-ai/admin
53
+ * downstream of whichever plugin drew it.
54
+ */
55
+ confirm?: {
56
+ /** The claim the operator is making by ticking it. */
57
+ acknowledge: string;
58
+ /** The quieter line under it — what happens to what is captured. */
59
+ note?: string;
60
+ };
37
61
  /**
38
62
  * The live audio, for the composer's level meter. Lent by the owner rather
39
63
  * than captured again: a second `getUserMedia` on the same mic is another
@@ -43,8 +67,16 @@ export interface AssistantActivity {
43
67
  */
44
68
  stream?: () => MediaStream | null;
45
69
  }
46
- /** Idle-state offer, so the panel is where a session begins as well as where
47
- * it is watched. */
70
+ /**
71
+ * Something this app can START from the panel — offered by the colleague whose
72
+ * job it is, in their own thread.
73
+ *
74
+ * The offer used to sit on everyone's greeting screen and was taken back out,
75
+ * rightly: a feature most sessions never touch does not belong at the top of
76
+ * the one screen whose job is to get a sentence typed. With a cast it has an
77
+ * owner, and on the Auxiliar's thread "gravar o atendimento" is not clutter —
78
+ * it is the thing she is for.
79
+ */
48
80
  export interface AssistantLauncher {
49
81
  id: string;
50
82
  label: string;
@@ -53,6 +85,15 @@ export interface AssistantLauncher {
53
85
  disabled?: boolean;
54
86
  /** Why it is unavailable — surfaced as the button's title. */
55
87
  disabledReason?: string;
88
+ /**
89
+ * Whose offer this is. Shown only while that colleague is answering.
90
+ *
91
+ * Deliberately STRICTER than the same field on a tool: an unplayed role
92
+ * leaves a tool open to everyone (losing a module would cost capability),
93
+ * but a launcher is a button on the greeting, and the cost of showing it to
94
+ * nobody in particular is the clutter that got it removed the first time.
95
+ */
96
+ role?: AgentRole;
56
97
  }
57
98
  export declare function publishAssistantActivity(activity: AssistantActivity): void;
58
99
  export declare function withdrawAssistantActivity(id: string): void;
@@ -69,6 +110,8 @@ export declare function __readAssistantRegistry(): {
69
110
  current: AssistantActivity | null;
70
111
  };
71
112
  export declare function useAssistantLaunchers(): AssistantLauncher[];
113
+ /** What the colleague on duty can start. See {@link AssistantLauncher.role}. */
114
+ export declare function useLaunchersForRole(role: AgentRole | null | undefined): AssistantLauncher[];
72
115
  /** Publish while mounted, withdraw on unmount. `null` when nothing is live. */
73
116
  export declare function usePublishAssistantActivity(activity: AssistantActivity | null): void;
74
117
  /** Register from a mounted component; withdrawn on unmount. */
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-activity.d.ts","sourceRoot":"","sources":["../../src/lib/assistant-activity.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAA;AAElE,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAA;AAEjG,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,qBAAqB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,iFAAiF;IACjF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAA;IACV,wEAAwE;IACxE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAA;IAC1B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,sBAAsB,CAAA;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAA;CAClC;AAED;qBACqB;AACrB,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,WAAW,GAAG,MAAM,CAAA;IAC1B,GAAG,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAY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AyB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAK1D;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAG3E;AAED,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAK5D;AAgBD;;qCAEqC;AACrC,wBAAgB,oBAAoB,IAAI,iBAAiB,GAAG,IAAI,CAG/D;AAgBD,+DAA+D;AAC/D,wBAAgB,uBAAuB,IAAI;IACzC,UAAU,EAAE,iBAAiB,EAAE,CAAA;IAC/B,SAAS,EAAE,iBAAiB,EAAE,CAAA;IAC9B,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAClC,CAEA;AAED,wBAAgB,qBAAqB,IAAI,iBAAiB,EAAE,CAG3D;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,GAAG,iBAAiB,EAAE,CAG3F;AAED,+EAA+E;AAC/E,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAmBpF;AAED,+DAA+D;AAC/D,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAiBrF;AAED;mDACmD;AACnD,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED,2CAA2C;AAC3C,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAOxD"}
@@ -1,3 +1,4 @@
1
+ import type { AgentRole } from '@fayz-ai/core';
1
2
  /**
2
3
  * Assistant Invite — how a screen ASKS to be helped.
3
4
  *
@@ -12,6 +13,14 @@
12
13
  *
13
14
  * One invite is active at a time: it belongs to the screen the user is on.
14
15
  */
16
+ /**
17
+ * The id a screen's handoff borrows the invite under ("Criar com IA").
18
+ *
19
+ * Lives here, not in the button: whoever asks "is the assistant in the middle
20
+ * of a delegated task?" is asking about the INVITE. The rail reads it to fall
21
+ * quiet — see RightRail.
22
+ */
23
+ export declare const ASK_AI_HANDOFF_ID = "ask-ai.handoff";
15
24
  export interface AssistantInviteSuggestion {
16
25
  label: string;
17
26
  /** Sent instead of `label` when the chip is picked. */
@@ -20,7 +29,17 @@ export interface AssistantInviteSuggestion {
20
29
  export interface AssistantInviteDef {
21
30
  /** Stable id — also the session key that remembers a dismissal. */
22
31
  id: string;
23
- /** Names the assistant for this screen ("Growth Analyst"), heading the rail. */
32
+ /**
33
+ * Which colleague this screen's help belongs to. With a cast, opening the
34
+ * assistant here puts them on duty — the deterministic half of the routing,
35
+ * for the cases the model should never have to guess.
36
+ */
37
+ role?: AgentRole;
38
+ /**
39
+ * What the help IS, in the user's words ("Montador de formulários"). Names
40
+ * the assistant on an app with no cast; with one, the colleague supplies the
41
+ * name and this stays as the subject beside it.
42
+ */
24
43
  persona?: string;
25
44
  /** Hero headline. `{{name}}` resolves to the signed-in user's first name. */
26
45
  headline: string;
@@ -1 +1 @@
1
- {"version":3,"file":"assistant-invite.d.ts","sourceRoot":"","sources":["../../src/lib/assistant-invite.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,EAAE,EAAE,MAAM,CAAA;IACV,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAA;IAChB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AA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,CAAC,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAA;IAChB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACzC,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,CAAA;AA4B5B,kFAAkF;AAClF,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAA;IACjC,KAAK,EAAE,KAAK,CAAA;IACZ;;2CAEuC;IACvC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB;kFAC8E;IAC9E,OAAO,EAAE;QAAE,MAAM,EAAE,kBAAkB,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;IAC5D,2EAA2E;IAC3E,SAAS,EAAE,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACnE,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IACzC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,eAAO,MAAM,uBAAuB,mFA8CjC,CAAA"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Strip tool-call artifacts from assistant text.
3
+ *
4
+ * Runs on every delta, so it must be cheap and must never mangle a partial
5
+ * token: an unclosed `{requestMenuPhotos` matches nothing and simply survives
6
+ * until the closing brace arrives.
7
+ */
8
+ export declare function sanitizeAssistantText(text: string): string;
9
+ //# sourceMappingURL=assistant-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assistant-text.d.ts","sourceRoot":"","sources":["../../src/lib/assistant-text.ts"],"names":[],"mappings":"AA4BA;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAc1D"}
@@ -0,0 +1,12 @@
1
+ import { type UploadRequest } from '../stores/chat.store';
2
+ /**
3
+ * Ask the user for a file, through the assistant.
4
+ *
5
+ * A tool calls this and the composer grows one big button ("Subir foto do
6
+ * cardápio"). The bytes go straight to `onFiles` — they never enter the turn,
7
+ * because a turn carries a DIGEST of a file and, for an image, that digest is
8
+ * empty. This is what makes "manda a foto" a thing the agent can actually
9
+ * follow through on today.
10
+ */
11
+ export declare function requestChatUpload(request: Omit<UploadRequest, 'id' | 'status' | 'files'>): string;
12
+ //# sourceMappingURL=chat-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-upload.d.ts","sourceRoot":"","sources":["../../src/lib/chat-upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEvE;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,GAAG,MAAM,CAEjG"}
@@ -46,4 +46,21 @@ export declare const PROFILE_ACTIONS: readonly ["read", "create", "edit", "delet
46
46
  */
47
47
  export declare function buildPermissionTools(features: FeatureDeclaration[], profiles?: PermissionProfile[]): PluginAITool[];
48
48
  export declare function generateEntityTools(entities?: RegisteredEntity[]): PluginAITool[];
49
+ /**
50
+ * `callColleague` — the one way an agent reaches another.
51
+ *
52
+ * Built per turn rather than declared statically because its whole value is the
53
+ * enum: naming the colleagues by role lets the model pick one instead of
54
+ * inventing a name, and an app with nobody else on staff never sees the tool at
55
+ * all. Un-hired colleagues are listed too — offering them is the honest answer
56
+ * when the tools for that job are absent, and the executor renders the offer
57
+ * rather than the hand-off.
58
+ */
59
+ export declare function buildColleagueTool(colleagues: Array<{
60
+ role: string;
61
+ name: string;
62
+ title: string;
63
+ goal: string;
64
+ hired: boolean;
65
+ }>): PluginAITool[];
49
66
  //# sourceMappingURL=core-ai-tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-ai-tools.d.ts","sourceRoot":"","sources":["../../src/lib/core-ai-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACrF,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGrE;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAAY,EA+FrC,CAAA;AA0BD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAK7E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,YAAY,EAAE,CAoBvG;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAO9D;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD;AAmDD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CAAA;IAC5C,aAAa,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,CAAC;QAAC,QAAQ,C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AAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAC9E,GAAG,YAAY,EAAE,CA8MjB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,+CAAgD,CAAA;AAK5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,kBAAkB,EAAE,EAC9B,QAAQ,GAAE,iBAAiB,EAAO,GACjC,YAAY,EAAE,CAoFhB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,GAAE,gBAAgB,EAAqB,GAAG,YAAY,EAAE,CAoBnG;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,GAC7F,YAAY,EAAE,CAqChB"}
@@ -18,6 +18,15 @@ export interface ResolvedFayzAgentConnection {
18
18
  apiBaseUrl: string;
19
19
  publishableKey: string;
20
20
  }
21
+ /**
22
+ * Just the platform address, for the endpoints that need no credential.
23
+ *
24
+ * Separate from `resolveFayzAgentConnection` because that one requires all three
25
+ * variables: an app without an agent key still has a platform to talk to, and
26
+ * gating the anonymous endpoints on the agent key would silently switch them off
27
+ * for most of the fleet.
28
+ */
29
+ export declare function resolveFayzApiBaseUrl(override?: string): string | undefined;
21
30
  export declare function resolveFayzAgentConnection(override?: FayzAgentConnectionConfig | false): ResolvedFayzAgentConnection | null;
22
31
  export declare function getFayzAgentClient(connection: ResolvedFayzAgentConnection): FayzAgentClient;
23
32
  //# sourceMappingURL=fayz-agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fayz-agent.d.ts","sourceRoot":"","sources":["../../src/lib/fayz-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhF;;;;;;;;GAQG;AAEH,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAOD,wBAAgB,0BAA0B,CACxC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,KAAK,GAC3C,2BAA2B,GAAG,IAAI,CASpC;AAID,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,2BAA2B,GAAG,eAAe,CAW3F"}
1
+ {"version":3,"file":"fayz-agent.d.ts","sourceRoot":"","sources":["../../src/lib/fayz-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhF;;;;;;;;GAQG;AAEH,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAOD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,KAAK,GAC3C,2BAA2B,GAAG,IAAI,CASpC;AAID,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,2BAA2B,GAAG,eAAe,CAW3F"}
@@ -0,0 +1,11 @@
1
+ import type { ChatStaffCard } from '../stores/chat.store';
2
+ /**
3
+ * Turn a `callColleague` result into the colleague card under the reply.
4
+ *
5
+ * Same contract as {@link extractConnectorCards}: the chat reads the tool's own
6
+ * output instead of the executor reaching into the store, so a resumed thread
7
+ * replays the card it rendered live. Nothing is inferred — only a payload that
8
+ * says it is a staff pitch produces one.
9
+ */
10
+ export declare function extractStaffCards(content: string): ChatStaffCard[];
11
+ //# sourceMappingURL=staff-cards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staff-cards.d.ts","sourceRoot":"","sources":["../../src/lib/staff-cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CA8BlE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=unit-ai-handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-ai-handlers.d.ts","sourceRoot":"","sources":["../../src/lib/unit-ai-handlers.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { PluginAITool } from '@fayz-ai/core';
2
+ export declare const unitAITools: PluginAITool[];
3
+ //# sourceMappingURL=unit-ai-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-ai-tools.d.ts","sourceRoot":"","sources":["../../src/lib/unit-ai-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAkBjD,eAAO,MAAM,WAAW,EAAE,YAAY,EAoErC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The getting-started checklist in the rail's foot.
4
+ *
5
+ * `SidebarOnboarding` lives in @fayz-ai/ui, which cannot reach a store or a
6
+ * database, so the loading half is here — the same split as `SeuSiteWidget`:
7
+ * self-loading, tenant-keyed, self-hiding.
8
+ *
9
+ * Same rows the assistant's Tasks tab shows. Ticking a step there and reloading
10
+ * moves the count here, because there is only one place either of them reads.
11
+ */
12
+ export declare function GettingStartedWidget(): React.JSX.Element | null;
13
+ //# sourceMappingURL=GettingStartedWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GettingStartedWidget.d.ts","sourceRoot":"","sources":["../../src/onboarding/GettingStartedWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,6BAoCnC"}
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import { type WizardMedia } from '@fayz-ai/ui';
3
+ import type { SetupSource } from './types';
4
+ export interface WorkspaceSetupFlowProps {
5
+ source: SetupSource;
6
+ /** Fixed by the app. Absent means the flow asks which vertical this is. */
7
+ verticalId?: string;
8
+ timezone?: string;
9
+ currency?: string;
10
+ locale?: string;
11
+ logo?: React.ReactNode;
12
+ /** Per-step artwork, keyed by step id — where an app plugs its own images in. */
13
+ media?: Record<string, WizardMedia>;
14
+ /** Omitted on the first workspace: there is no app behind the flow to go back to. */
15
+ onExit?: () => void;
16
+ onCreated?: (orgId: string) => void;
17
+ className?: string;
18
+ }
19
+ /**
20
+ * The workspace setup flow — one wizard serving both the first workspace after
21
+ * signup and every extra one from the switcher.
22
+ */
23
+ export declare function WorkspaceSetupFlow({ source, verticalId, timezone, currency, locale, logo, media, onExit, onCreated, className, }: WorkspaceSetupFlowProps): React.JSX.Element;
24
+ //# sourceMappingURL=WorkspaceSetupFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceSetupFlow.d.ts","sourceRoot":"","sources":["../../src/onboarding/WorkspaceSetupFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAyC,MAAM,aAAa,CAAA;AAU7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,WAAW,CAAA;IACnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACnC,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAC1F,EAAE,uBAAuB,qBAgGzB"}
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ import type { WizardMedia } from '@fayz-ai/ui';
3
+ import type { SetupMode } from './resolve';
4
+ export interface WorkspaceSetupGateProps {
5
+ mode: SetupMode;
6
+ verticalId?: string;
7
+ timezone?: string;
8
+ currency?: string;
9
+ locale?: string;
10
+ logo?: React.ReactNode;
11
+ media?: Record<string, WizardMedia>;
12
+ /** Held on screen while we do not yet know if this account has a workspace. */
13
+ fallback?: React.ReactNode;
14
+ children: React.ReactNode;
15
+ }
16
+ /**
17
+ * Puts the setup flow in front of the shell when it applies, and gets out of the
18
+ * way when it does not.
19
+ *
20
+ * Mounted inside the AuthGate but outside the chrome, for the same reason the
21
+ * consent screen is: a sidebar around "name your business" invites someone to
22
+ * wander off before they have a business to wander around in.
23
+ */
24
+ export declare function WorkspaceSetupGate({ mode, verticalId, timezone, currency, locale, logo, media, fallback, children, }: WorkspaceSetupGateProps): React.JSX.Element;
25
+ //# sourceMappingURL=WorkspaceSetupGate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceSetupGate.d.ts","sourceRoot":"","sources":["../../src/onboarding/WorkspaceSetupGate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAG9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAE1C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,SAAS,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAC9E,EAAE,uBAAuB,qBA4BzB"}
@@ -0,0 +1,23 @@
1
+ import type { WizardStepDef, WizardValues } from '@fayz-ai/ui';
2
+ export interface SiteAnalyzerOptions {
3
+ /** `VITE_FAYZ_API_BASE_URL`, in either of its two spellings. */
4
+ apiBaseUrl?: string;
5
+ /**
6
+ * The whole flow, so the questions go out and the answers come back typed.
7
+ *
8
+ * A getter rather than the array, because the field that triggers this lives
9
+ * inside the steps it needs — taking them lazily is what keeps the flow to a
10
+ * single build instead of one pass to read the questions and another to attach
11
+ * the handler.
12
+ */
13
+ steps: () => ReadonlyArray<WizardStepDef>;
14
+ locale?: string;
15
+ fetcher?: typeof fetch;
16
+ }
17
+ /**
18
+ * Returns null — never throws — when there is nothing to offer. Every caller is
19
+ * a user mid-form who has no use for the difference between a dead site and a
20
+ * dead network.
21
+ */
22
+ export declare function createSiteAnalyzer({ apiBaseUrl, steps, locale, fetcher, }: SiteAnalyzerOptions): (url: string) => Promise<WizardValues | null>;
23
+ //# sourceMappingURL=analyze-site.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze-site.d.ts","sourceRoot":"","sources":["../../src/onboarding/analyze-site.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAsB9D,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,aAAa,CAAC,aAAa,CAAC,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACV,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmCrE"}
@@ -0,0 +1,44 @@
1
+ import { type SetupSource } from './types';
2
+ import type { WizardValues } from '@fayz-ai/ui';
3
+ /**
4
+ * Upload the workspace logo BEFORE the tenant exists.
5
+ *
6
+ * Every other logo path in the shell keys storage by tenant id, which is not an
7
+ * option here — the tenant is created at the end of the flow. Keyed by user
8
+ * instead, in the same bucket the branding screen already writes to, so the file
9
+ * ends up where the rest of the app looks for it.
10
+ */
11
+ export declare function createLogoUploader(userId: string): (file: File) => Promise<string>;
12
+ /**
13
+ * Re-host a logo we read off someone else's site.
14
+ *
15
+ * The site import hands back whatever URL the page served its logo from — a CDN
16
+ * we do not control, or an inline `data:` URI. Storing either on the tenant row
17
+ * means the workspace's logo breaks the day they redesign, so it is copied into
18
+ * our own bucket before it is saved.
19
+ *
20
+ * Returns null on any failure, and the caller keeps the original URL: a logo
21
+ * that might break later still beats no logo at all.
22
+ */
23
+ export declare function importLogoFromUrl(userId: string, url: string): Promise<string | null>;
24
+ /**
25
+ * Is this handle free? Falls back to "yes" whenever we cannot ask — the unique
26
+ * constraint on `tenants.slug` is the real guard, and a failed probe must not
27
+ * stop someone from continuing.
28
+ */
29
+ export declare function checkSlugAvailable(slug: string): Promise<boolean>;
30
+ export interface RecordResponseInput {
31
+ tenantId: string;
32
+ userId: string;
33
+ verticalId?: string;
34
+ source: SetupSource;
35
+ heardFrom?: string;
36
+ values: WizardValues;
37
+ }
38
+ /**
39
+ * Persist what they told us. Deliberately swallows its own failures: the caller
40
+ * has just created a workspace, and losing a questionnaire row is not a reason
41
+ * to tell someone their business was not created.
42
+ */
43
+ export declare function recordOnboardingResponse(input: RecordResponseInput): Promise<boolean>;
44
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/onboarding/backend.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyD,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AACjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM/C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAgBlF;AAKD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwB3F;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMvE;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,WAAW,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAoB3F"}