guideai-app 0.5.4-2 → 0.5.4-8

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 (190) hide show
  1. package/README.md +105 -1
  2. package/dist/GuideAI.d.ts +2 -5
  3. package/dist/GuideAI.js +1 -1
  4. package/dist/GuideAI.js.LICENSE.txt +2 -17
  5. package/dist/buddy/buddyPropTools.d.ts +188 -0
  6. package/dist/buddy/buddyStore.d.ts +88 -0
  7. package/dist/buddy/buddyTools.d.ts +6 -0
  8. package/dist/buddy/types.d.ts +56 -0
  9. package/dist/components/DeveloperTools.d.ts +5 -3
  10. package/dist/components/Microphone.d.ts +17 -2
  11. package/dist/components/PlaybackLockDebugOverlayRoot.d.ts +1 -1
  12. package/dist/components/SessionRatingPopup.d.ts +16 -0
  13. package/dist/components/SubtitleInputBar.d.ts +23 -0
  14. package/dist/components/SubtitleSettingsMenu.d.ts +9 -0
  15. package/dist/components/TranscriptBox.d.ts +16 -12
  16. package/dist/components/TranscriptMessages.d.ts +8 -1
  17. package/dist/components/TranscriptNextStepBar.d.ts +34 -0
  18. package/dist/components/TranscriptSessionMicLevels.d.ts +8 -0
  19. package/dist/components/TranscriptStudioChrome.d.ts +8 -7
  20. package/dist/components/TranscriptTextInput.d.ts +4 -12
  21. package/dist/components/TranscriptToolbar.d.ts +3 -1
  22. package/dist/components/TranscriptWorkflowDrawer.d.ts +5 -7
  23. package/dist/contexts/GuideAIThemeContext.d.ts +13 -0
  24. package/dist/devtools/DeveloperToolsShell.d.ts +1 -1
  25. package/dist/devtools/TranscriptDeveloperToolsMenuItems.d.ts +45 -0
  26. package/dist/devtools/TranscriptUiDevtoolsPanel.d.ts +10 -0
  27. package/dist/devtools/adminToolDiagnostics/AdminToolDiagnosticsPanel.d.ts +1 -1
  28. package/dist/devtools/developerToolPanelId.d.ts +1 -1
  29. package/dist/devtools/devtoolsAdminPortalLinks.d.ts +11 -0
  30. package/dist/devtools/devtoolsAuth/DevtoolsAuthContext.d.ts +14 -0
  31. package/dist/devtools/devtoolsAuth/DevtoolsLoginModal.d.ts +13 -0
  32. package/dist/devtools/devtoolsAuth/devtoolsAccessTrigger.d.ts +9 -0
  33. package/dist/devtools/devtoolsAuth/devtoolsAdminApi.d.ts +13 -0
  34. package/dist/devtools/devtoolsAuth/devtoolsLoginModalStyles.d.ts +1 -0
  35. package/dist/devtools/devtoolsAuth/devtoolsPortalLogin.d.ts +15 -0
  36. package/dist/devtools/devtoolsAuth/devtoolsSessionStorage.d.ts +4 -0
  37. package/dist/devtools/devtoolsAuth/index.d.ts +9 -0
  38. package/dist/devtools/devtoolsAuth/types.d.ts +21 -0
  39. package/dist/devtools/devtoolsAuth/useDevtoolsAccess.d.ts +33 -0
  40. package/dist/devtools/devtoolsThemePreference.d.ts +3 -0
  41. package/dist/devtools/excavator/ExcavatorPanel.d.ts +17 -0
  42. package/dist/devtools/excavator/excavatorPanelStyles.d.ts +5 -0
  43. package/dist/devtools/excavator/excavatorSse.d.ts +6 -0
  44. package/dist/devtools/learn/LearnCaptureChrome.stub.d.ts +3 -0
  45. package/dist/devtools/learn/LearnModePanel.d.ts +18 -0
  46. package/dist/devtools/learn/LearnModePanel.stub.d.ts +3 -0
  47. package/dist/devtools/learn/LearnOrchestrationHost.d.ts +52 -0
  48. package/dist/devtools/learn/injectLearnModeStyles.d.ts +2 -0
  49. package/dist/devtools/learn/learnCaptureChrome.d.ts +33 -0
  50. package/dist/devtools/learn/learnCaptureLayout.d.ts +26 -0
  51. package/dist/devtools/learn/learnCaptureToolbar.d.ts +27 -0
  52. package/dist/devtools/learn/learnClarifyKickoff.d.ts +6 -0
  53. package/dist/devtools/learn/learnLiteTranscript.d.ts +22 -0
  54. package/dist/devtools/learn/learnModeStyles.d.ts +5 -0
  55. package/dist/devtools/learn/learnModeTypes.d.ts +5 -0
  56. package/dist/devtools/learn/learnOrchestrationStub.d.ts +5 -0
  57. package/dist/devtools/learn/learnPanelSyncFieldsEqual.d.ts +3 -0
  58. package/dist/devtools/learn/learnRealtimeSession.d.ts +10 -0
  59. package/dist/devtools/learn/learnRefBag.d.ts +41 -0
  60. package/dist/devtools/learn/learnSessionStorage.d.ts +23 -0
  61. package/dist/devtools/learn/learnWebRTCInit.d.ts +20 -0
  62. package/dist/devtools/learn/learnWorkspaceContext.d.ts +5 -0
  63. package/dist/devtools/learn/loadLearnOrchestration.d.ts +10 -0
  64. package/dist/devtools/learn/useLearnCaptureDuration.d.ts +4 -0
  65. package/dist/devtools/learn/useLearnClickCapture.d.ts +9 -0
  66. package/dist/devtools/learn/useLearnMode.d.ts +47 -0
  67. package/dist/devtools/learn/useLearnMode.stub.d.ts +3 -0
  68. package/dist/devtools/panelLayout.d.ts +6 -0
  69. package/dist/devtools/silentMessages/silentMessageDebug.d.ts +86 -0
  70. package/dist/devtools/silentMessages/useSilentMessageDebug.d.ts +18 -0
  71. package/dist/devtools/transcriptDevtoolsMenuProps.d.ts +33 -0
  72. package/dist/devtools/transcriptMoreMenu/DeveloperToolsAdminPortalFlyout.d.ts +20 -0
  73. package/dist/devtools/transcriptMoreMenu/DeveloperToolsLoggerFlyout.d.ts +16 -0
  74. package/dist/devtools/transcriptMoreMenu/DeveloperToolsMicPresetFlyout.d.ts +22 -0
  75. package/dist/devtools/transcriptMoreMenu/ThemePresetSwatch.d.ts +8 -0
  76. package/dist/devtools/transcriptMoreMenu/TranscriptDeveloperToolsMenuItems.d.ts +25 -0
  77. package/dist/devtools/transcriptMoreMenu/TranscriptDeveloperToolsThemeFlyout.d.ts +13 -0
  78. package/dist/devtools/transcriptMoreMenu/TranscriptMoreMenuDevtools.d.ts +27 -0
  79. package/dist/devtools/transcriptMoreMenu/devtoolsFlyoutTypes.d.ts +1 -0
  80. package/dist/devtools/transcriptMoreMenu/index.d.ts +2 -0
  81. package/dist/devtools/transcriptMoreMenu/readWindowGuideAILogger.d.ts +12 -0
  82. package/dist/devtools/transcriptMoreMenu/useTranscriptMoreMenuDebugFlyouts.d.ts +24 -0
  83. package/dist/devtools/useDraggableDialog.d.ts +8 -1
  84. package/dist/devtools/useGuideDeveloperTools.d.ts +16 -7
  85. package/dist/devtools/useGuideDevtoolsIntegration.d.ts +56 -0
  86. package/dist/devtools/workflowTester/WorkflowTesterPanel.d.ts +4 -28
  87. package/dist/devtools/workflowTester/WorkflowTesterPanel.stub.d.ts +3 -0
  88. package/dist/devtools/workflowTester/index.d.ts +1 -2
  89. package/dist/devtools/workflowTester/useWorkflowSimulationController.d.ts +12 -0
  90. package/dist/devtools/workflowTester/useWorkflowSimulationRun.d.ts +47 -0
  91. package/dist/devtools/workflowTester/workflowSimulationController.d.ts +31 -0
  92. package/dist/devtools/workflowTester/workflowSimulationDevtoolsApi.d.ts +51 -0
  93. package/dist/devtools/workflowTester/workflowSimulationFinishRun.d.ts +4 -0
  94. package/dist/devtools/workflowTester/workflowSimulationRunner.d.ts +46 -0
  95. package/dist/devtools/workflowTester/workflowSimulationRunnerAi.d.ts +20 -0
  96. package/dist/devtools/workflowTester/workflowSimulationSessionRestore.d.ts +21 -0
  97. package/dist/devtools/workflowTester/workflowSimulationTurnState.d.ts +20 -0
  98. package/dist/devtools/workflowTester/workflowSimulationTypes.d.ts +28 -0
  99. package/dist/devtools/workflowTester/workflowSimulationWaits.d.ts +55 -0
  100. package/dist/devtools/workflowTester/workflowTesterPanel.types.d.ts +25 -0
  101. package/dist/devtools/workflowTester/workflowTesterRunSessionStorage.d.ts +43 -0
  102. package/dist/devtools/workflowTester/workflowTesterWorkspaceBridge.d.ts +4 -2
  103. package/dist/hooks/useConversationSession.d.ts +16 -2
  104. package/dist/hooks/useGuideAIMutePipeline.d.ts +1 -0
  105. package/dist/hooks/useGuideAIThemeState.d.ts +6 -0
  106. package/dist/hooks/useHiddenRealtimeSteers.d.ts +3 -1
  107. package/dist/hooks/useLauncherTabDrag.d.ts +23 -0
  108. package/dist/hooks/useMicMute.d.ts +1 -0
  109. package/dist/hooks/useSessionRating.d.ts +21 -0
  110. package/dist/hooks/useSubtitleAppearancePrefs.d.ts +5 -0
  111. package/dist/hooks/useThemePortalProps.d.ts +4 -0
  112. package/dist/hooks/useTranscriptChrome.d.ts +7 -2
  113. package/dist/hooks/useTranscriptDisplayMode.d.ts +6 -0
  114. package/dist/hooks/useTranscriptPanelDragResize.d.ts +47 -0
  115. package/dist/hooks/useWebRTC.d.ts +9 -0
  116. package/dist/hooks/useWidgetWorkflowSession.d.ts +2 -0
  117. package/dist/hooks/useWorkflowTesterOverlay.d.ts +10 -10
  118. package/dist/hooks/useWorkspaceCatalog.d.ts +1 -0
  119. package/dist/index.d.ts +4 -1
  120. package/dist/lib/workspaceEmbedIcons.d.ts +0 -1
  121. package/dist/playwrightBuddyHarness.d.ts +12 -0
  122. package/dist/playwrightBuddyHarness.js +1766 -0
  123. package/dist/playwrightSimulationHarness.d.ts +16 -0
  124. package/dist/playwrightSimulationHarness.js +1 -0
  125. package/dist/playwrightToolHarness.d.ts +6 -2
  126. package/dist/playwrightToolHarness.js +1 -1
  127. package/dist/sessionRating.defaults.d.ts +4 -0
  128. package/dist/sessionRatingPrompts.d.ts +1 -0
  129. package/dist/staticContext/collectContext.d.ts +24 -13
  130. package/dist/staticContext/collectors/domSignals.d.ts +29 -0
  131. package/dist/staticContext/collectors/jqueryUi.d.ts +7 -0
  132. package/dist/staticContext/collectors/visibility.d.ts +6 -0
  133. package/dist/staticContext/hostPageFrameworkProbe.d.ts +21 -0
  134. package/dist/staticContext/index.d.ts +3 -2
  135. package/dist/staticContext/types.d.ts +112 -4
  136. package/dist/staticContext/useStaticContext.d.ts +5 -3
  137. package/dist/stubs/workspaces.d.ts +2 -2
  138. package/dist/styles/GuideAI.styles.d.ts +5 -1
  139. package/dist/styles/guideAIStylesTabLauncher.d.ts +7 -0
  140. package/dist/styles/guideAIThemeTokens.d.ts +5 -0
  141. package/dist/styles/guideaiTestsiteWidgetTheme.d.ts +6 -0
  142. package/dist/themes/buildThemeCss.d.ts +8 -0
  143. package/dist/themes/guideAIThemeIds.d.ts +5 -0
  144. package/dist/themes/presetThemes.d.ts +9 -0
  145. package/dist/themes/syncGuideAITheme.d.ts +2 -0
  146. package/dist/themes/themeTokens.types.d.ts +37 -0
  147. package/dist/types/GuideAI.types.d.ts +43 -4
  148. package/dist/utils/api.d.ts +39 -0
  149. package/dist/utils/api.learn.d.ts +18 -0
  150. package/dist/utils/conversationContextSwitch.d.ts +41 -0
  151. package/dist/utils/conversationManager.d.ts +39 -2
  152. package/dist/utils/dataChannel.d.ts +15 -0
  153. package/dist/utils/dataChannelHelpers.d.ts +26 -6
  154. package/dist/utils/guideaiMirroredStorageKeys.d.ts +35 -0
  155. package/dist/utils/lastSystemToolCall.d.ts +2 -1
  156. package/dist/utils/localStorageHelper.d.ts +52 -32
  157. package/dist/utils/localStorageThrottle.d.ts +6 -0
  158. package/dist/utils/messageStorage.d.ts +20 -7
  159. package/dist/utils/parseWorkspaceSlugList.d.ts +13 -0
  160. package/dist/utils/pathIncludesAnyRef.d.ts +12 -0
  161. package/dist/utils/resolveCatalogWorkspaceSlug.d.ts +11 -0
  162. package/dist/utils/sessionRatingThrottle.d.ts +3 -0
  163. package/dist/utils/sessionStorageJson.d.ts +3 -0
  164. package/dist/utils/themeRegistry.d.ts +14 -0
  165. package/dist/utils/tools/clickElement.d.ts +6 -0
  166. package/dist/utils/tools/cursorStyles.d.ts +17 -0
  167. package/dist/utils/tools/descriptionToHighlightSelector.d.ts +1 -1
  168. package/dist/utils/tools/docToForm.d.ts +2 -2
  169. package/dist/utils/tools/elementInteractions.d.ts +35 -1
  170. package/dist/utils/tools/elementToBestInteractionSelector.d.ts +8 -0
  171. package/dist/utils/tools/fillField.d.ts +1 -1
  172. package/dist/utils/tools/hover.d.ts +6 -0
  173. package/dist/utils/tools/selectWorkspace.d.ts +45 -0
  174. package/dist/utils/tools/toolRegistry.d.ts +5 -1
  175. package/dist/utils/tools/workspaceToolBridge.d.ts +22 -0
  176. package/dist/utils/transcriptDisplayModePref.d.ts +4 -0
  177. package/dist/utils/transcriptFloatGeometry.d.ts +78 -0
  178. package/dist/utils/transcriptSubtitleUiPref.d.ts +5 -0
  179. package/dist/utils/webrtcConnection.d.ts +7 -0
  180. package/dist/utils/widgetBearerStorage.d.ts +2 -2
  181. package/dist/utils/widgetWorkspaces.d.ts +0 -2
  182. package/dist/utils/workflowProgressSync.d.ts +65 -0
  183. package/dist/utils/workflowSteer.d.ts +10 -0
  184. package/dist/utils/workspaceCatalog.d.ts +20 -3
  185. package/dist/utils/workspaceCatalogFatal.d.ts +4 -0
  186. package/dist/visualContext/defaultProvider.d.ts +4 -10
  187. package/dist/visualContext/screenshotEncoding.d.ts +37 -0
  188. package/dist/visualContext/useVisualContext.d.ts +2 -1
  189. package/dist/visualContext/visualContextCaptureLock.d.ts +17 -0
  190. package/package.json +2 -2
package/README.md CHANGED
@@ -37,19 +37,83 @@ function App() {
37
37
  | Prop | Type | Required | Description |
38
38
  | --------------------------------- | ---------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39
39
  | `authKey` | `string` | Yes (customer embed) | Widget access key; **not** persisted by the package. Exchanged once for a JWT via `POST /widget/session`. **Do not use React’s reserved `key` attribute** — use this prop name. |
40
- | `workspace` | `string` | No | Workspace slug to use for the realtime session. Forwarded on the `/initialize` body so the server can pick a non-default workspace per request. Omit to use the customer default. |
40
+ | `workspace` | `string` | No | Default workspace **slug** for the first realtime session (single value). Forwarded on `/initialize`. Omit to use the customer default. When used with `workspaces`, pick a slug from that allowlist. |
41
+ | `workspaces` | `string` or `string[]` | No | Catalog allowlist: limits which workspaces (and their workflows) end users can access. Omit for all customer workspaces. Comma-separated string (`"sales,support"`) or array. Invalid/empty allowlist removes the widget and logs `console.error`. |
41
42
  | `getUserInfo` | `function` | No | Lets Guide AI know who is signed in on your app (see **Signed-in users** below). |
42
43
  | `initializeUserId` | `string` | No | Advanced: optional fixed user id when you manage identity yourself. |
43
44
  | `adminConversationPersistenceKey` | `string` | No | Optional stable key for transcript `localStorage` isolation. Omit to use a non-secret default from the page **origin** (same across SPA routes). Never use the raw access key here. |
44
45
  | `React` | `React` | Yes | React instance from your application |
45
46
  | `ReactDOM` | `ReactDOM` | Yes | ReactDOM instance from your application |
46
47
  | `position` | `object` | No | CSS positioning for the component (see below) |
48
+ | `launcher` | `object` | No | Launcher presentation: floating mic circle (default) or a draggable side tab (see below) |
47
49
  | `environment` | `string` | No | API environment: `'production'` (default), `'development'`, or `'local'` |
48
50
  | `transcript` | `object` | No | Transcript panel configuration (see below) |
49
51
  | `input` | `object` | No | Text/voice input configuration (see below) |
52
+ | `theme` | `string` | No | Built-in color theme preset id (see **Themes** below). Omit for the package default palette. |
50
53
 
51
54
  You must pass **`authKey`** (customer integration). For authentication details, see **`AUTHENTICATION.md`** in this package.
52
55
 
56
+ ## Themes
57
+
58
+ Set the widget color palette with the `theme` prop. All presets are bundled in `guideai-app`; no extra scripts or CDN files are required.
59
+
60
+ ```jsx
61
+ <GuideAI
62
+ authKey="your-access-key"
63
+ workspace="your-workspace"
64
+ React={React}
65
+ ReactDOM={ReactDOM}
66
+ theme="dark"
67
+ />
68
+ ```
69
+
70
+ Role-based catalog example:
71
+
72
+ ```jsx
73
+ <GuideAI
74
+ authKey={accessKey}
75
+ workspace="support"
76
+ workspaces={user.role === 'admin' ? 'admin,support' : 'support'}
77
+ React={React}
78
+ ReactDOM={ReactDOM}
79
+ />
80
+ ```
81
+
82
+ Omit `theme` (or pass `null`) to use the default package palette (**Studio blue**).
83
+
84
+ ### Light themes
85
+
86
+ | `theme` id | Name |
87
+ | -------------- | ----- |
88
+ | `light-ivory` | Ivory |
89
+ | `light-snow` | Snow |
90
+ | `light-sand` | Sand |
91
+ | `light-mist` | Mist |
92
+ | `light-mint` | Mint |
93
+ | `light-sky` | Sky |
94
+ | `light-coral` | Coral |
95
+ | `light-rose` | Rose |
96
+ | `light-plum` | Plum |
97
+ | `light-slate` | Slate |
98
+
99
+ ### Dark themes
100
+
101
+ | `theme` id | Name |
102
+ | ----------------- | ------------ |
103
+ | `dark` | Studio blue |
104
+ | `dark-muted-gray` | Muted gray |
105
+ | `dark-midnight` | Midnight |
106
+ | `dark-ocean` | Ocean |
107
+ | `dark-forest` | Forest |
108
+ | `dark-teal` | Teal |
109
+ | `dark-violet` | Violet |
110
+ | `dark-ember` | Ember |
111
+ | `dark-carbon` | Carbon |
112
+ | `dark-ruby` | Ruby |
113
+ | `dark-graphite` | Graphite |
114
+
115
+ TypeScript hosts can import `GuideAIThemeId` or `GUIDEAI_THEME_IDS` from `guideai-app`. Labels are also available on `GUIDEAI_PRESET_THEMES`.
116
+
53
117
  ## Position Object
54
118
 
55
119
  The `position` prop accepts an object with CSS positioning properties to control where the Guide AI button appears on your page, as well as z-index configuration for all Guide AI components:
@@ -124,6 +188,46 @@ position?: {
124
188
  />
125
189
  ```
126
190
 
191
+ ## Launcher Object
192
+
193
+ The `launcher` prop selects how the idle Guide AI control is presented:
194
+
195
+ ```typescript
196
+ launcher?: {
197
+ variant?: 'mic' | 'tab'; // 'mic' (default): floating circle. 'tab': edge-docked side tab.
198
+ side?: 'left' | 'right'; // Tab variant only — screen edge to dock to (default: 'right')
199
+ }
200
+ ```
201
+
202
+ The tab behaves exactly like the mic circle (click to start/end a conversation, same status
203
+ colors and idle prompt animations), but it sits flush against the screen edge and can be
204
+ **dragged up and down** that edge. The dragged offset is persisted in `localStorage` per
205
+ conversation key, so the tab stays where the user left it. With `variant: 'tab'`, the CSS
206
+ placement properties of `position` are ignored (`position.zIndex` still applies), and the
207
+ transcript defaults to opening on the same side as the tab.
208
+
209
+ **Right-edge tab:**
210
+
211
+ ```jsx
212
+ <GuideAI
213
+ authKey="your-access-key"
214
+ React={React}
215
+ ReactDOM={ReactDOM}
216
+ launcher={{ variant: 'tab' }}
217
+ />
218
+ ```
219
+
220
+ **Left-edge tab:**
221
+
222
+ ```jsx
223
+ <GuideAI
224
+ authKey="your-access-key"
225
+ React={React}
226
+ ReactDOM={ReactDOM}
227
+ launcher={{ variant: 'tab', side: 'left' }}
228
+ />
229
+ ```
230
+
127
231
  ## Transcript Object
128
232
 
129
233
  The `transcript` prop controls the conversation transcript panel:
package/dist/GuideAI.d.ts CHANGED
@@ -1,6 +1,3 @@
1
1
  import { GuideAIProps } from './types/GuideAI.types';
2
- /**
3
- * Default export is the GuideAI React component.
4
- */
5
- declare const GuideAI: (props: GuideAIProps) => import("react").JSX.Element | null;
6
- export default GuideAI;
2
+ declare const GuideAIComponent: (props: GuideAIProps) => import("react").JSX.Element | null;
3
+ export default GuideAIComponent;